var Lb=Object.defineProperty;var Jg=t=>{throw TypeError(t)};var Mb=(t,e,n)=>e in t?Lb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Me=(t,e,n)=>Mb(t,typeof e!="symbol"?e+"":e,n),md=(t,e,n)=>e.has(t)||Jg("Cannot "+n);var O=(t,e,n)=>(md(t,e,"read from private field"),n?n.call(t):e.get(t)),ge=(t,e,n)=>e.has(t)?Jg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),te=(t,e,n,s)=>(md(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),Ne=(t,e,n)=>(md(t,e,"access private method"),n);var Pl=(t,e,n,s)=>({set _(o){te(t,e,o,n)},get _(){return O(t,e,s)}});function Ib(t,e){for(var n=0;ns[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Xf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gd={exports:{}},_o={},yd={exports:{}},ke={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Zg;function Fb(){if(Zg)return ke;Zg=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function w(D){return D===null||typeof D!="object"?null:(D=v&&D[v]||D["@@iterator"],typeof D=="function"?D:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,b={};function S(D,$,fe){this.props=D,this.context=$,this.refs=b,this.updater=fe||T}S.prototype.isReactComponent={},S.prototype.setState=function(D,$){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,$,"setState")},S.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function E(){}E.prototype=S.prototype;function k(D,$,fe){this.props=D,this.context=$,this.refs=b,this.updater=fe||T}var P=k.prototype=new E;P.constructor=k,R(P,S.prototype),P.isPureReactComponent=!0;var A=Array.isArray,F=Object.prototype.hasOwnProperty,B={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function U(D,$,fe){var ye,me={},X=null,be=null;if($!=null)for(ye in $.ref!==void 0&&(be=$.ref),$.key!==void 0&&(X=""+$.key),$)F.call($,ye)&&!q.hasOwnProperty(ye)&&(me[ye]=$[ye]);var Ae=arguments.length-2;if(Ae===1)me.children=fe;else if(1>>1,$=Q[D];if(0>>1;Do(me,z))X<$&&0>o(be,me)?(Q[D]=be,Q[X]=z,D=X):(Q[D]=me,Q[ye]=z,D=ye);else if(X<$&&0>o(be,z))Q[D]=be,Q[X]=z,D=X;else break e}}return se}function o(Q,se){var z=Q.sortIndex-se.sortIndex;return z!==0?z:Q.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();t.unstable_now=function(){return u.now()-d}}var f=[],p=[],g=1,v=null,w=3,T=!1,R=!1,b=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(Q){for(var se=n(p);se!==null;){if(se.callback===null)s(p);else if(se.startTime<=Q)s(p),se.sortIndex=se.expirationTime,e(f,se);else break;se=n(p)}}function A(Q){if(b=!1,P(Q),!R)if(n(f)!==null)R=!0,_e(F);else{var se=n(p);se!==null&&de(A,se.startTime-Q)}}function F(Q,se){R=!1,b&&(b=!1,E(U),U=-1),T=!0;var z=w;try{for(P(se),v=n(f);v!==null&&(!(v.expirationTime>se)||Q&&!xe());){var D=v.callback;if(typeof D=="function"){v.callback=null,w=v.priorityLevel;var $=D(v.expirationTime<=se);se=t.unstable_now(),typeof $=="function"?v.callback=$:v===n(f)&&s(f),P(se)}else s(f);v=n(f)}if(v!==null)var fe=!0;else{var ye=n(p);ye!==null&&de(A,ye.startTime-se),fe=!1}return fe}finally{v=null,w=z,T=!1}}var B=!1,q=null,U=-1,Y=5,ne=-1;function xe(){return!(t.unstable_now()-neQ||125D?(Q.sortIndex=z,e(p,Q),n(f)===null&&Q===n(p)&&(b?(E(U),U=-1):b=!0,de(A,z-D))):(Q.sortIndex=$,e(f,Q),R||T||(R=!0,_e(F))),Q},t.unstable_shouldYield=xe,t.unstable_wrapCallback=function(Q){var se=w;return function(){var z=w;w=se;try{return Q.apply(this,arguments)}finally{w=z}}}})(wd)),wd}var sy;function zb(){return sy||(sy=1,xd.exports=Bb()),xd.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var iy;function $b(){if(iy)return It;iy=1;var t=Yf(),e=zb();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},v={};function w(r){return f.call(v,r)?!0:f.call(g,r)?!1:p.test(r)?v[r]=!0:(g[r]=!0,!1)}function T(r,i,a,c){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function R(r,i,a,c){if(i===null||typeof i>"u"||T(r,i,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function b(r,i,a,c,h,m,x){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=r,this.type=i,this.sanitizeURL=m,this.removeEmptyString=x}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){S[r]=new b(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];S[i]=new b(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){S[r]=new b(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){S[r]=new b(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){S[r]=new b(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){S[r]=new b(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){S[r]=new b(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){S[r]=new b(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){S[r]=new b(r,5,!1,r.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function k(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(E,k);S[i]=new b(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(E,k);S[i]=new b(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(E,k);S[i]=new b(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){S[r]=new b(r,1,!1,r.toLowerCase(),null,!1,!1)}),S.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){S[r]=new b(r,1,!1,r.toLowerCase(),null,!0,!0)});function P(r,i,a,c){var h=S.hasOwnProperty(i)?S[i]:null;(h!==null?h.type!==0:c||!(2C||h[x]!==m[C]){var N=` `+h[x].replace(" at new "," at ");return r.displayName&&N.includes("")&&(N=N.replace("",r.displayName)),N}while(1<=x&&0<=C);break}}}finally{fe=!1,Error.prepareStackTrace=a}return(r=r?r.displayName||r.name:"")?$(r):""}function me(r){switch(r.tag){case 5:return $(r.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return r=ye(r.type,!1),r;case 11:return r=ye(r.type.render,!1),r;case 1:return r=ye(r.type,!0),r;default:return""}}function X(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case q:return"Fragment";case B:return"Portal";case Y:return"Profiler";case U:return"StrictMode";case Ee:return"Suspense";case Z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case xe:return(r.displayName||"Context")+".Consumer";case ne:return(r._context.displayName||"Context")+".Provider";case Pe:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Ce:return i=r.displayName||null,i!==null?i:X(r.type)||"Memo";case _e:i=r._payload,r=r._init;try{return X(r(i))}catch{}}return null}function be(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(i);case 8:return i===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Ae(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Se(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function at(r){var i=Se(r)?"checked":"value",a=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),c=""+r[i];if(!r.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,m=a.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return h.call(this)},set:function(x){c=""+x,m.call(this,x)}}),Object.defineProperty(r,i,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(x){c=""+x},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Xt(r){r._valueTracker||(r._valueTracker=at(r))}function ft(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return r&&(c=Se(r)?r.checked?"true":"false":r.value),r=c,r!==a?(i.setValue(r),!0):!1}function fn(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Yt(r,i){var a=i.checked;return z({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked})}function Jt(r,i){var a=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;a=Ae(i.value!=null?i.value:a),r._wrapperState={initialChecked:c,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Te(r,i){i=i.checked,i!=null&&P(r,"checked",i,!1)}function ht(r,i){Te(r,i);var a=Ae(i.value),c=i.type;if(a!=null)c==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+a):r.value!==""+a&&(r.value=""+a);else if(c==="submit"||c==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?pn(r,i.type,a):i.hasOwnProperty("defaultValue")&&pn(r,i.type,Ae(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function hn(r,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,a||i===r.value||(r.value=i),r.defaultValue=i}a=r.name,a!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,a!==""&&(r.name=a)}function pn(r,i,a){(i!=="number"||fn(r.ownerDocument)!==r)&&(a==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+a&&(r.defaultValue=""+a))}var sr=Array.isArray;function ir(r,i,a,c){if(r=r.options,i){i={};for(var h=0;h"+i.valueOf().toString()+"",i=xa.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function Vi(r,i){if(i){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=i;return}}r.textContent=i}var Bi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},US=["Webkit","ms","Moz","O"];Object.keys(Bi).forEach(function(r){US.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Bi[i]=Bi[r]})});function hp(r,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||Bi.hasOwnProperty(r)&&Bi[r]?(""+i).trim():i+"px"}function pp(r,i){r=r.style;for(var a in i)if(i.hasOwnProperty(a)){var c=a.indexOf("--")===0,h=hp(a,i[a],c);a==="float"&&(a="cssFloat"),c?r.setProperty(a,h):r[a]=h}}var VS=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Pu(r,i){if(i){if(VS[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function Ru(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ku=null;function Au(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Nu=null,Us=null,Vs=null;function mp(r){if(r=uo(r)){if(typeof Nu!="function")throw Error(n(280));var i=r.stateNode;i&&(i=za(i),Nu(r.stateNode,r.type,i))}}function gp(r){Us?Vs?Vs.push(r):Vs=[r]:Us=r}function yp(){if(Us){var r=Us,i=Vs;if(Vs=Us=null,mp(r),i)for(r=0;r>>=0,r===0?32:31-(YS(r)/JS|0)|0}var Ta=64,_a=4194304;function Hi(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Ca(r,i){var a=r.pendingLanes;if(a===0)return 0;var c=0,h=r.suspendedLanes,m=r.pingedLanes,x=a&268435455;if(x!==0){var C=x&~h;C!==0?c=Hi(C):(m&=x,m!==0&&(c=Hi(m)))}else x=a&~h,x!==0?c=Hi(x):m!==0&&(c=Hi(m));if(c===0)return 0;if(i!==0&&i!==c&&(i&h)===0&&(h=c&-c,m=i&-i,h>=m||h===16&&(m&4194240)!==0))return i;if((c&4)!==0&&(c|=a&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=c;0a;a++)i.push(r);return i}function qi(r,i,a){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-mn(i),r[i]=a}function nE(r,i){var a=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var c=r.eventTimes;for(r=r.expirationTimes;0=eo),Hp=" ",qp=!1;function Kp(r,i){switch(r){case"keyup":return AE.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var $s=!1;function OE(r,i){switch(r){case"compositionend":return Qp(i);case"keypress":return i.which!==32?null:(qp=!0,Hp);case"textInput":return r=i.data,r===Hp&&qp?null:r;default:return null}}function jE(r,i){if($s)return r==="compositionend"||!Gu&&Kp(r,i)?(r=Up(),Na=$u=cr=null,$s=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:a,offset:i-r};r=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=tm(a)}}function rm(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?rm(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function sm(){for(var r=window,i=fn();i instanceof r.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)r=i.contentWindow;else break;i=fn(r.document)}return i}function Ju(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function zE(r){var i=sm(),a=r.focusedElem,c=r.selectionRange;if(i!==a&&a&&a.ownerDocument&&rm(a.ownerDocument.documentElement,a)){if(c!==null&&Ju(a)){if(i=c.start,r=c.end,r===void 0&&(r=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(r,a.value.length);else if(r=(i=a.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var h=a.textContent.length,m=Math.min(c.start,h);c=c.end===void 0?m:Math.min(c.end,h),!r.extend&&m>c&&(h=c,c=m,m=h),h=nm(a,m);var x=nm(a,c);h&&x&&(r.rangeCount!==1||r.anchorNode!==h.node||r.anchorOffset!==h.offset||r.focusNode!==x.node||r.focusOffset!==x.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),r.removeAllRanges(),m>c?(r.addRange(i),r.extend(x.node,x.offset)):(i.setEnd(x.node,x.offset),r.addRange(i)))}}for(i=[],r=a;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,Ws=null,Zu=null,so=null,ec=!1;function im(r,i,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ec||Ws==null||Ws!==fn(c)||(c=Ws,"selectionStart"in c&&Ju(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),so&&ro(so,c)||(so=c,c=Ua(Zu,"onSelect"),0Gs||(r.current=fc[Gs],fc[Gs]=null,Gs--)}function Ve(r,i){Gs++,fc[Gs]=r.current,r.current=i}var pr={},wt=hr(pr),Ot=hr(!1),Zr=pr;function Xs(r,i){var a=r.type.contextTypes;if(!a)return pr;var c=r.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in a)h[m]=i[m];return c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=h),h}function jt(r){return r=r.childContextTypes,r!=null}function $a(){ze(Ot),ze(wt)}function wm(r,i,a){if(wt.current!==pr)throw Error(n(168));Ve(wt,i),Ve(Ot,a)}function Sm(r,i,a){var c=r.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var h in c)if(!(h in i))throw Error(n(108,be(r)||"Unknown",h));return z({},a,c)}function Wa(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||pr,Zr=wt.current,Ve(wt,r),Ve(Ot,Ot.current),!0}function Em(r,i,a){var c=r.stateNode;if(!c)throw Error(n(169));a?(r=Sm(r,i,Zr),c.__reactInternalMemoizedMergedChildContext=r,ze(Ot),ze(wt),Ve(wt,r)):ze(Ot),Ve(Ot,a)}var zn=null,Ha=!1,hc=!1;function bm(r){zn===null?zn=[r]:zn.push(r)}function eb(r){Ha=!0,bm(r)}function mr(){if(!hc&&zn!==null){hc=!0;var r=0,i=Fe;try{var a=zn;for(Fe=1;r>=x,h-=x,$n=1<<32-mn(i)+h|a<we?(ct=pe,pe=null):ct=pe.sibling;var Le=W(M,pe,I[we],G);if(Le===null){pe===null&&(pe=ct);break}r&&pe&&Le.alternate===null&&i(M,pe),j=m(Le,j,we),he===null?ce=Le:he.sibling=Le,he=Le,pe=ct}if(we===I.length)return a(M,pe),We&&ts(M,we),ce;if(pe===null){for(;wewe?(ct=pe,pe=null):ct=pe.sibling;var Tr=W(M,pe,Le.value,G);if(Tr===null){pe===null&&(pe=ct);break}r&&pe&&Tr.alternate===null&&i(M,pe),j=m(Tr,j,we),he===null?ce=Tr:he.sibling=Tr,he=Tr,pe=ct}if(Le.done)return a(M,pe),We&&ts(M,we),ce;if(pe===null){for(;!Le.done;we++,Le=I.next())Le=K(M,Le.value,G),Le!==null&&(j=m(Le,j,we),he===null?ce=Le:he.sibling=Le,he=Le);return We&&ts(M,we),ce}for(pe=c(M,pe);!Le.done;we++,Le=I.next())Le=ee(pe,M,we,Le.value,G),Le!==null&&(r&&Le.alternate!==null&&pe.delete(Le.key===null?we:Le.key),j=m(Le,j,we),he===null?ce=Le:he.sibling=Le,he=Le);return r&&pe.forEach(function(Db){return i(M,Db)}),We&&ts(M,we),ce}function Je(M,j,I,G){if(typeof I=="object"&&I!==null&&I.type===q&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case F:e:{for(var ce=I.key,he=j;he!==null;){if(he.key===ce){if(ce=I.type,ce===q){if(he.tag===7){a(M,he.sibling),j=h(he,I.props.children),j.return=M,M=j;break e}}else if(he.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===_e&&km(ce)===he.type){a(M,he.sibling),j=h(he,I.props),j.ref=co(M,he,I),j.return=M,M=j;break e}a(M,he);break}else i(M,he);he=he.sibling}I.type===q?(j=us(I.props.children,M.mode,G,I.key),j.return=M,M=j):(G=xl(I.type,I.key,I.props,null,M.mode,G),G.ref=co(M,j,I),G.return=M,M=G)}return x(M);case B:e:{for(he=I.key;j!==null;){if(j.key===he)if(j.tag===4&&j.stateNode.containerInfo===I.containerInfo&&j.stateNode.implementation===I.implementation){a(M,j.sibling),j=h(j,I.children||[]),j.return=M,M=j;break e}else{a(M,j);break}else i(M,j);j=j.sibling}j=cd(I,M.mode,G),j.return=M,M=j}return x(M);case _e:return he=I._init,Je(M,j,he(I._payload),G)}if(sr(I))return ie(M,j,I,G);if(se(I))return le(M,j,I,G);Ga(M,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,j!==null&&j.tag===6?(a(M,j.sibling),j=h(j,I),j.return=M,M=j):(a(M,j),j=ud(I,M.mode,G),j.return=M,M=j),x(M)):a(M,j)}return Je}var ei=Am(!0),Nm=Am(!1),Xa=hr(null),Ya=null,ti=null,xc=null;function wc(){xc=ti=Ya=null}function Sc(r){var i=Xa.current;ze(Xa),r._currentValue=i}function Ec(r,i,a){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===a)break;r=r.return}}function ni(r,i){Ya=r,xc=ti=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(Dt=!0),r.firstContext=null)}function tn(r){var i=r._currentValue;if(xc!==r)if(r={context:r,memoizedValue:i,next:null},ti===null){if(Ya===null)throw Error(n(308));ti=r,Ya.dependencies={lanes:0,firstContext:r}}else ti=ti.next=r;return i}var ns=null;function bc(r){ns===null?ns=[r]:ns.push(r)}function Om(r,i,a,c){var h=i.interleaved;return h===null?(a.next=a,bc(i)):(a.next=h.next,h.next=a),i.interleaved=a,Hn(r,c)}function Hn(r,i){r.lanes|=i;var a=r.alternate;for(a!==null&&(a.lanes|=i),a=r,r=r.return;r!==null;)r.childLanes|=i,a=r.alternate,a!==null&&(a.childLanes|=i),a=r,r=r.return;return a.tag===3?a.stateNode:null}var gr=!1;function Tc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jm(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function qn(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function yr(r,i,a){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(De&2)!==0){var h=c.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),c.pending=i,Hn(r,a)}return h=c.interleaved,h===null?(i.next=i,bc(c)):(i.next=h.next,h.next=i),c.interleaved=i,Hn(r,a)}function Ja(r,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var c=i.lanes;c&=r.pendingLanes,a|=c,i.lanes=a,Fu(r,a)}}function Dm(r,i){var a=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var x={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};m===null?h=m=x:m=m.next=x,a=a.next}while(a!==null);m===null?h=m=i:m=m.next=i}else h=m=i;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:c.shared,effects:c.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=i:r.next=i,a.lastBaseUpdate=i}function Za(r,i,a,c){var h=r.updateQueue;gr=!1;var m=h.firstBaseUpdate,x=h.lastBaseUpdate,C=h.shared.pending;if(C!==null){h.shared.pending=null;var N=C,V=N.next;N.next=null,x===null?m=V:x.next=V,x=N;var H=r.alternate;H!==null&&(H=H.updateQueue,C=H.lastBaseUpdate,C!==x&&(C===null?H.firstBaseUpdate=V:C.next=V,H.lastBaseUpdate=N))}if(m!==null){var K=h.baseState;x=0,H=V=N=null,C=m;do{var W=C.lane,ee=C.eventTime;if((c&W)===W){H!==null&&(H=H.next={eventTime:ee,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var ie=r,le=C;switch(W=i,ee=a,le.tag){case 1:if(ie=le.payload,typeof ie=="function"){K=ie.call(ee,K,W);break e}K=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=le.payload,W=typeof ie=="function"?ie.call(ee,K,W):ie,W==null)break e;K=z({},K,W);break e;case 2:gr=!0}}C.callback!==null&&C.lane!==0&&(r.flags|=64,W=h.effects,W===null?h.effects=[C]:W.push(C))}else ee={eventTime:ee,lane:W,tag:C.tag,payload:C.payload,callback:C.callback,next:null},H===null?(V=H=ee,N=K):H=H.next=ee,x|=W;if(C=C.next,C===null){if(C=h.shared.pending,C===null)break;W=C,C=W.next,W.next=null,h.lastBaseUpdate=W,h.shared.pending=null}}while(!0);if(H===null&&(N=K),h.baseState=N,h.firstBaseUpdate=V,h.lastBaseUpdate=H,i=h.shared.interleaved,i!==null){h=i;do x|=h.lane,h=h.next;while(h!==i)}else m===null&&(h.shared.lanes=0);is|=x,r.lanes=x,r.memoizedState=K}}function Lm(r,i,a){if(r=i.effects,i.effects=null,r!==null)for(i=0;ia?a:4,r(!0);var c=kc.transition;kc.transition={};try{r(!1),i()}finally{Fe=a,kc.transition=c}}function eg(){return nn().memoizedState}function sb(r,i,a){var c=Sr(r);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},tg(r))ng(i,a);else if(a=Om(r,i,a,c),a!==null){var h=At();Sn(a,r,c,h),rg(a,i,c)}}function ib(r,i,a){var c=Sr(r),h={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(tg(r))ng(i,h);else{var m=r.alternate;if(r.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var x=i.lastRenderedState,C=m(x,a);if(h.hasEagerState=!0,h.eagerState=C,gn(C,x)){var N=i.interleaved;N===null?(h.next=h,bc(i)):(h.next=N.next,N.next=h),i.interleaved=h;return}}catch{}finally{}a=Om(r,i,h,c),a!==null&&(h=At(),Sn(a,r,c,h),rg(a,i,c))}}function tg(r){var i=r.alternate;return r===qe||i!==null&&i===qe}function ng(r,i){mo=nl=!0;var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}function rg(r,i,a){if((a&4194240)!==0){var c=i.lanes;c&=r.pendingLanes,a|=c,i.lanes=a,Fu(r,a)}}var il={readContext:tn,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},ob={readContext:tn,useCallback:function(r,i){return An().memoizedState=[r,i===void 0?null:i],r},useContext:tn,useEffect:qm,useImperativeHandle:function(r,i,a){return a=a!=null?a.concat([r]):null,rl(4194308,4,Gm.bind(null,i,r),a)},useLayoutEffect:function(r,i){return rl(4194308,4,r,i)},useInsertionEffect:function(r,i){return rl(4,2,r,i)},useMemo:function(r,i){var a=An();return i=i===void 0?null:i,r=r(),a.memoizedState=[r,i],r},useReducer:function(r,i,a){var c=An();return i=a!==void 0?a(i):i,c.memoizedState=c.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},c.queue=r,r=r.dispatch=sb.bind(null,qe,r),[c.memoizedState,r]},useRef:function(r){var i=An();return r={current:r},i.memoizedState=r},useState:Wm,useDebugValue:Mc,useDeferredValue:function(r){return An().memoizedState=r},useTransition:function(){var r=Wm(!1),i=r[0];return r=rb.bind(null,r[1]),An().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,a){var c=qe,h=An();if(We){if(a===void 0)throw Error(n(407));a=a()}else{if(a=i(),ut===null)throw Error(n(349));(ss&30)!==0||Um(c,i,a)}h.memoizedState=a;var m={value:a,getSnapshot:i};return h.queue=m,qm(Bm.bind(null,c,m,r),[r]),c.flags|=2048,vo(9,Vm.bind(null,c,m,a,i),void 0,null),a},useId:function(){var r=An(),i=ut.identifierPrefix;if(We){var a=Wn,c=$n;a=(c&~(1<<32-mn(c)-1)).toString(32)+a,i=":"+i+"R"+a,a=go++,0<\/script>",r=r.removeChild(r.firstChild)):typeof c.is=="string"?r=x.createElement(a,{is:c.is}):(r=x.createElement(a),a==="select"&&(x=r,c.multiple?x.multiple=!0:c.size&&(x.size=c.size))):r=x.createElementNS(r,a),r[Rn]=i,r[lo]=c,bg(r,i,!1,!1),i.stateNode=r;e:{switch(x=Ru(a,c),a){case"dialog":Be("cancel",r),Be("close",r),h=c;break;case"iframe":case"object":case"embed":Be("load",r),h=c;break;case"video":case"audio":for(h=0;hai&&(i.flags|=128,c=!0,xo(m,!1),i.lanes=4194304)}else{if(!c)if(r=el(x),r!==null){if(i.flags|=128,c=!0,a=r.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),xo(m,!0),m.tail===null&&m.tailMode==="hidden"&&!x.alternate&&!We)return Et(i),null}else 2*Ye()-m.renderingStartTime>ai&&a!==1073741824&&(i.flags|=128,c=!0,xo(m,!1),i.lanes=4194304);m.isBackwards?(x.sibling=i.child,i.child=x):(a=m.last,a!==null?a.sibling=x:i.child=x,m.last=x)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=Ye(),i.sibling=null,a=He.current,Ve(He,c?a&1|2:a&1),i):(Et(i),null);case 22:case 23:return od(),c=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==c&&(i.flags|=8192),c&&(i.mode&1)!==0?(qt&1073741824)!==0&&(Et(i),i.subtreeFlags&6&&(i.flags|=8192)):Et(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function pb(r,i){switch(mc(i),i.tag){case 1:return jt(i.type)&&$a(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return ri(),ze(Ot),ze(wt),Rc(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return Cc(i),null;case 13:if(ze(He),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));Zs()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return ze(He),null;case 4:return ri(),null;case 10:return Sc(i.type._context),null;case 22:case 23:return od(),null;case 24:return null;default:return null}}var ul=!1,bt=!1,mb=typeof WeakSet=="function"?WeakSet:Set,re=null;function ii(r,i){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Qe(r,i,c)}else a.current=null}function Qc(r,i,a){try{a()}catch(c){Qe(r,i,c)}}var Cg=!1;function gb(r,i){if(oc=ka,r=sm(),Ju(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var x=0,C=-1,N=-1,V=0,H=0,K=r,W=null;t:for(;;){for(var ee;K!==a||h!==0&&K.nodeType!==3||(C=x+h),K!==m||c!==0&&K.nodeType!==3||(N=x+c),K.nodeType===3&&(x+=K.nodeValue.length),(ee=K.firstChild)!==null;)W=K,K=ee;for(;;){if(K===r)break t;if(W===a&&++V===h&&(C=x),W===m&&++H===c&&(N=x),(ee=K.nextSibling)!==null)break;K=W,W=K.parentNode}K=ee}a=C===-1||N===-1?null:{start:C,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(ac={focusedElem:r,selectionRange:a},ka=!1,re=i;re!==null;)if(i=re,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,re=r;else for(;re!==null;){i=re;try{var ie=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var le=ie.memoizedProps,Je=ie.memoizedState,M=i.stateNode,j=M.getSnapshotBeforeUpdate(i.elementType===i.type?le:vn(i.type,le),Je);M.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var I=i.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(G){Qe(i,i.return,G)}if(r=i.sibling,r!==null){r.return=i.return,re=r;break}re=i.return}return ie=Cg,Cg=!1,ie}function wo(r,i,a){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&r)===r){var m=h.destroy;h.destroy=void 0,m!==void 0&&Qc(i,a,m)}h=h.next}while(h!==c)}}function cl(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&r)===r){var c=a.create;a.destroy=c()}a=a.next}while(a!==i)}}function Gc(r){var i=r.ref;if(i!==null){var a=r.stateNode;switch(r.tag){case 5:r=a;break;default:r=a}typeof i=="function"?i(r):i.current=r}}function Pg(r){var i=r.alternate;i!==null&&(r.alternate=null,Pg(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[Rn],delete i[lo],delete i[dc],delete i[JE],delete i[ZE])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Rg(r){return r.tag===5||r.tag===3||r.tag===4}function kg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Rg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Xc(r,i,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(r,i):a.insertBefore(r,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(r,a)):(i=a,i.appendChild(r)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Ba));else if(c!==4&&(r=r.child,r!==null))for(Xc(r,i,a),r=r.sibling;r!==null;)Xc(r,i,a),r=r.sibling}function Yc(r,i,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?a.insertBefore(r,i):a.appendChild(r);else if(c!==4&&(r=r.child,r!==null))for(Yc(r,i,a),r=r.sibling;r!==null;)Yc(r,i,a),r=r.sibling}var pt=null,xn=!1;function vr(r,i,a){for(a=a.child;a!==null;)Ag(r,i,a),a=a.sibling}function Ag(r,i,a){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount(ba,a)}catch{}switch(a.tag){case 5:bt||ii(a,i);case 6:var c=pt,h=xn;pt=null,vr(r,i,a),pt=c,xn=h,pt!==null&&(xn?(r=pt,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):pt.removeChild(a.stateNode));break;case 18:pt!==null&&(xn?(r=pt,a=a.stateNode,r.nodeType===8?cc(r.parentNode,a):r.nodeType===1&&cc(r,a),Yi(r)):cc(pt,a.stateNode));break;case 4:c=pt,h=xn,pt=a.stateNode.containerInfo,xn=!0,vr(r,i,a),pt=c,xn=h;break;case 0:case 11:case 14:case 15:if(!bt&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var m=h,x=m.destroy;m=m.tag,x!==void 0&&((m&2)!==0||(m&4)!==0)&&Qc(a,i,x),h=h.next}while(h!==c)}vr(r,i,a);break;case 1:if(!bt&&(ii(a,i),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(C){Qe(a,i,C)}vr(r,i,a);break;case 21:vr(r,i,a);break;case 22:a.mode&1?(bt=(c=bt)||a.memoizedState!==null,vr(r,i,a),bt=c):vr(r,i,a);break;default:vr(r,i,a)}}function Ng(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new mb),i.forEach(function(c){var h=_b.bind(null,r,c);a.has(c)||(a.add(c),c.then(h,h))})}}function wn(r,i){var a=i.deletions;if(a!==null)for(var c=0;ch&&(h=x),c&=~m}if(c=h,c=Ye()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*vb(c/1960))-c,10r?16:r,wr===null)var c=!1;else{if(r=wr,wr=null,ml=0,(De&6)!==0)throw Error(n(331));var h=De;for(De|=4,re=r.current;re!==null;){var m=re,x=m.child;if((re.flags&16)!==0){var C=m.deletions;if(C!==null){for(var N=0;NYe()-ed?as(r,0):Zc|=a),Mt(r,i)}function Wg(r,i){i===0&&((r.mode&1)===0?i=1:(i=_a,_a<<=1,(_a&130023424)===0&&(_a=4194304)));var a=At();r=Hn(r,i),r!==null&&(qi(r,i,a),Mt(r,a))}function Tb(r){var i=r.memoizedState,a=0;i!==null&&(a=i.retryLane),Wg(r,a)}function _b(r,i){var a=0;switch(r.tag){case 13:var c=r.stateNode,h=r.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=r.stateNode;break;default:throw Error(n(314))}c!==null&&c.delete(i),Wg(r,a)}var Hg;Hg=function(r,i,a){if(r!==null)if(r.memoizedProps!==i.pendingProps||Ot.current)Dt=!0;else{if((r.lanes&a)===0&&(i.flags&128)===0)return Dt=!1,fb(r,i,a);Dt=(r.flags&131072)!==0}else Dt=!1,We&&(i.flags&1048576)!==0&&Tm(i,Ka,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;ll(r,i),r=i.pendingProps;var h=Xs(i,wt.current);ni(i,a),h=Nc(null,i,c,r,h,a);var m=Oc();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,jt(c)?(m=!0,Wa(i)):m=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,Tc(i),h.updater=ol,i.stateNode=h,h._reactInternals=i,Fc(i,c,r,a),i=zc(null,i,c,!0,m,a)):(i.tag=0,We&&m&&pc(i),kt(null,i,h,a),i=i.child),i;case 16:c=i.elementType;e:{switch(ll(r,i),r=i.pendingProps,h=c._init,c=h(c._payload),i.type=c,h=i.tag=Pb(c),r=vn(c,r),h){case 0:i=Bc(null,i,c,r,a);break e;case 1:i=yg(null,i,c,r,a);break e;case 11:i=fg(null,i,c,r,a);break e;case 14:i=hg(null,i,c,vn(c.type,r),a);break e}throw Error(n(306,c,""))}return i;case 0:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:vn(c,h),Bc(r,i,c,h,a);case 1:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:vn(c,h),yg(r,i,c,h,a);case 3:e:{if(vg(i),r===null)throw Error(n(387));c=i.pendingProps,m=i.memoizedState,h=m.element,jm(r,i),Za(i,c,null,a);var x=i.memoizedState;if(c=x.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){h=si(Error(n(423)),i),i=xg(r,i,c,a,h);break e}else if(c!==h){h=si(Error(n(424)),i),i=xg(r,i,c,a,h);break e}else for(Ht=fr(i.stateNode.containerInfo.firstChild),Wt=i,We=!0,yn=null,a=Nm(i,null,c,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Zs(),c===h){i=Kn(r,i,a);break e}kt(r,i,c,a)}i=i.child}return i;case 5:return Mm(i),r===null&&yc(i),c=i.type,h=i.pendingProps,m=r!==null?r.memoizedProps:null,x=h.children,lc(c,h)?x=null:m!==null&&lc(c,m)&&(i.flags|=32),gg(r,i),kt(r,i,x,a),i.child;case 6:return r===null&&yc(i),null;case 13:return wg(r,i,a);case 4:return _c(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=ei(i,null,c,a):kt(r,i,c,a),i.child;case 11:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:vn(c,h),fg(r,i,c,h,a);case 7:return kt(r,i,i.pendingProps,a),i.child;case 8:return kt(r,i,i.pendingProps.children,a),i.child;case 12:return kt(r,i,i.pendingProps.children,a),i.child;case 10:e:{if(c=i.type._context,h=i.pendingProps,m=i.memoizedProps,x=h.value,Ve(Xa,c._currentValue),c._currentValue=x,m!==null)if(gn(m.value,x)){if(m.children===h.children&&!Ot.current){i=Kn(r,i,a);break e}}else for(m=i.child,m!==null&&(m.return=i);m!==null;){var C=m.dependencies;if(C!==null){x=m.child;for(var N=C.firstContext;N!==null;){if(N.context===c){if(m.tag===1){N=qn(-1,a&-a),N.tag=2;var V=m.updateQueue;if(V!==null){V=V.shared;var H=V.pending;H===null?N.next=N:(N.next=H.next,H.next=N),V.pending=N}}m.lanes|=a,N=m.alternate,N!==null&&(N.lanes|=a),Ec(m.return,a,i),C.lanes|=a;break}N=N.next}}else if(m.tag===10)x=m.type===i.type?null:m.child;else if(m.tag===18){if(x=m.return,x===null)throw Error(n(341));x.lanes|=a,C=x.alternate,C!==null&&(C.lanes|=a),Ec(x,a,i),x=m.sibling}else x=m.child;if(x!==null)x.return=m;else for(x=m;x!==null;){if(x===i){x=null;break}if(m=x.sibling,m!==null){m.return=x.return,x=m;break}x=x.return}m=x}kt(r,i,h.children,a),i=i.child}return i;case 9:return h=i.type,c=i.pendingProps.children,ni(i,a),h=tn(h),c=c(h),i.flags|=1,kt(r,i,c,a),i.child;case 14:return c=i.type,h=vn(c,i.pendingProps),h=vn(c.type,h),hg(r,i,c,h,a);case 15:return pg(r,i,i.type,i.pendingProps,a);case 17:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:vn(c,h),ll(r,i),i.tag=1,jt(c)?(r=!0,Wa(i)):r=!1,ni(i,a),ig(i,c,h),Fc(i,c,h,a),zc(null,i,c,!0,r,a);case 19:return Eg(r,i,a);case 22:return mg(r,i,a)}throw Error(n(156,i.tag))};function qg(r,i){return _p(r,i)}function Cb(r,i,a,c){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(r,i,a,c){return new Cb(r,i,a,c)}function ld(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Pb(r){if(typeof r=="function")return ld(r)?1:0;if(r!=null){if(r=r.$$typeof,r===Pe)return 11;if(r===Ce)return 14}return 2}function br(r,i){var a=r.alternate;return a===null?(a=sn(r.tag,i,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=i,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,i=r.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function xl(r,i,a,c,h,m){var x=2;if(c=r,typeof r=="function")ld(r)&&(x=1);else if(typeof r=="string")x=5;else e:switch(r){case q:return us(a.children,h,m,i);case U:x=8,h|=8;break;case Y:return r=sn(12,a,i,h|2),r.elementType=Y,r.lanes=m,r;case Ee:return r=sn(13,a,i,h),r.elementType=Ee,r.lanes=m,r;case Z:return r=sn(19,a,i,h),r.elementType=Z,r.lanes=m,r;case de:return wl(a,h,m,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ne:x=10;break e;case xe:x=9;break e;case Pe:x=11;break e;case Ce:x=14;break e;case _e:x=16,c=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=sn(x,a,i,h),i.elementType=r,i.type=c,i.lanes=m,i}function us(r,i,a,c){return r=sn(7,r,c,i),r.lanes=a,r}function wl(r,i,a,c){return r=sn(22,r,c,i),r.elementType=de,r.lanes=a,r.stateNode={isHidden:!1},r}function ud(r,i,a){return r=sn(6,r,null,i),r.lanes=a,r}function cd(r,i,a){return i=sn(4,r.children!==null?r.children:[],r.key,i),i.lanes=a,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function Rb(r,i,a,c,h){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Iu(0),this.expirationTimes=Iu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Iu(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function dd(r,i,a,c,h,m,x,C,N){return r=new Rb(r,i,a,C,N),i===1?(i=1,m===!0&&(i|=8)):i=0,m=sn(3,null,null,i),r.current=m,m.stateNode=r,m.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tc(m),r}function kb(r,i,a){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),vd.exports=$b(),vd.exports}var ay;function Wb(){if(ay)return Rl;ay=1;var t=tx();return Rl.createRoot=t.createRoot,Rl.hydrateRoot=t.hydrateRoot,Rl}var Hb=Wb();const qb=Xf(Hb),Kb=20,Qb=1e6,er={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Sd=0;function Gb(){return Sd=(Sd+1)%Number.MAX_VALUE,Sd.toString()}const Ed=new Map,ly=t=>{if(Ed.has(t))return;const e=setTimeout(()=>{Ed.delete(t),Uo({type:er.REMOVE_TOAST,toastId:t})},Qb);Ed.set(t,e)},Xb=(t,e)=>{switch(e.type){case er.ADD_TOAST:return{...t,toasts:[e.toast,...t.toasts].slice(0,Kb)};case er.UPDATE_TOAST:return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case er.DISMISS_TOAST:{const{toastId:n}=e;return n?ly(n):t.toasts.forEach(s=>{ly(s.id)}),{...t,toasts:t.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case er.REMOVE_TOAST:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},zl=[];let $l={toasts:[]};function Uo(t){$l=Xb($l,t),zl.forEach(e=>{e($l)})}function Yb({...t}){const e=Gb(),n=o=>Uo({type:er.UPDATE_TOAST,toast:{...o,id:e}}),s=()=>Uo({type:er.DISMISS_TOAST,toastId:e});return Uo({type:er.ADD_TOAST,toast:{...t,id:e,open:!0,onOpenChange:o=>{o||s()}}}),{id:e,dismiss:s,update:n}}function Jb(){const[t,e]=_.useState($l);return _.useEffect(()=>(zl.push(e),()=>{const n=zl.indexOf(e);n>-1&&zl.splice(n,1)}),[t]),{...t,toast:Yb,dismiss:n=>Uo({type:er.DISMISS_TOAST,toastId:n})}}var Jf=tx();const Zb=Xf(Jf);function Kt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t==null||t(o),n===!1||!o.defaultPrevented)return e==null?void 0:e(o)}}function uy(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Zf(...t){return e=>{let n=!1;const s=t.map(o=>{const l=uy(o,e);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o{var E;const{scope:w,children:T,...R}=v,b=((E=w==null?void 0:w[t])==null?void 0:E[f])||d,S=_.useMemo(()=>R,Object.values(R));return y.jsx(b.Provider,{value:S,children:T})};p.displayName=l+"Provider";function g(v,w){var b;const T=((b=w==null?void 0:w[t])==null?void 0:b[f])||d,R=_.useContext(T);if(R)return R;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${l}\``)}return[p,g]}const o=()=>{const l=n.map(u=>_.createContext(u));return function(d){const f=(d==null?void 0:d[t])||l;return _.useMemo(()=>({[`__scope${t}`]:{...d,[t]:f}}),[d,f])}};return o.scopeName=t,[s,eT(o,...e)]}function eT(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const s=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=s.reduce((d,{useScope:f,scopeName:p})=>{const v=f(l)[`__scope${p}`];return{...d,...v}},{});return _.useMemo(()=>({[`__scope${e.scopeName}`]:u}),[u])}};return n.scopeName=e.scopeName,n}function cy(t){const e=tT(t),n=_.forwardRef((s,o)=>{const{children:l,...u}=s,d=_.Children.toArray(l),f=d.find(rT);if(f){const p=f.props.children,g=d.map(v=>v===f?_.Children.count(p)>1?_.Children.only(null):_.isValidElement(p)?p.props.children:null:v);return y.jsx(e,{...u,ref:o,children:_.isValidElement(p)?_.cloneElement(p,void 0,g):null})}return y.jsx(e,{...u,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}function tT(t){const e=_.forwardRef((n,s)=>{const{children:o,...l}=n;if(_.isValidElement(o)){const u=iT(o),d=sT(l,o.props);return o.type!==_.Fragment&&(d.ref=s?Zf(s,u):u),_.cloneElement(o,d)}return _.Children.count(o)>1?_.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var nT=Symbol("radix.slottable");function rT(t){return _.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===nT}function sT(t,e){const n={...e};for(const s in e){const o=t[s],l=e[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function iT(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function oT(t){const e=t+"CollectionProvider",[n,s]=nx(e),[o,l]=n(e,{collectionRef:{current:null},itemMap:new Map}),u=b=>{const{scope:S,children:E}=b,k=Pr.useRef(null),P=Pr.useRef(new Map).current;return y.jsx(o,{scope:S,itemMap:P,collectionRef:k,children:E})};u.displayName=e;const d=t+"CollectionSlot",f=cy(d),p=Pr.forwardRef((b,S)=>{const{scope:E,children:k}=b,P=l(d,E),A=Ns(S,P.collectionRef);return y.jsx(f,{ref:A,children:k})});p.displayName=d;const g=t+"CollectionItemSlot",v="data-radix-collection-item",w=cy(g),T=Pr.forwardRef((b,S)=>{const{scope:E,children:k,...P}=b,A=Pr.useRef(null),F=Ns(S,A),B=l(g,E);return Pr.useEffect(()=>(B.itemMap.set(A,{ref:A,...P}),()=>void B.itemMap.delete(A))),y.jsx(w,{[v]:"",ref:F,children:k})});T.displayName=g;function R(b){const S=l(t+"CollectionConsumer",b);return Pr.useCallback(()=>{const k=S.collectionRef.current;if(!k)return[];const P=Array.from(k.querySelectorAll(`[${v}]`));return Array.from(S.itemMap.values()).sort((B,q)=>P.indexOf(B.ref.current)-P.indexOf(q.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:u,Slot:p,ItemSlot:T},R,s]}function aT(t){const e=lT(t),n=_.forwardRef((s,o)=>{const{children:l,...u}=s,d=_.Children.toArray(l),f=d.find(cT);if(f){const p=f.props.children,g=d.map(v=>v===f?_.Children.count(p)>1?_.Children.only(null):_.isValidElement(p)?p.props.children:null:v);return y.jsx(e,{...u,ref:o,children:_.isValidElement(p)?_.cloneElement(p,void 0,g):null})}return y.jsx(e,{...u,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}function lT(t){const e=_.forwardRef((n,s)=>{const{children:o,...l}=n;if(_.isValidElement(o)){const u=fT(o),d=dT(l,o.props);return o.type!==_.Fragment&&(d.ref=s?Zf(s,u):u),_.cloneElement(o,d)}return _.Children.count(o)>1?_.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var uT=Symbol("radix.slottable");function cT(t){return _.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===uT}function dT(t,e){const n={...e};for(const s in e){const o=t[s],l=e[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function fT(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var hT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Un=hT.reduce((t,e)=>{const n=aT(`Primitive.${e}`),s=_.forwardRef((o,l)=>{const{asChild:u,...d}=o,f=u?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(f,{...d,ref:l})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{});function rx(t,e){t&&Jf.flushSync(()=>t.dispatchEvent(e))}function Os(t){const e=_.useRef(t);return _.useEffect(()=>{e.current=t}),_.useMemo(()=>(...n)=>{var s;return(s=e.current)==null?void 0:s.call(e,...n)},[])}function pT(t,e=globalThis==null?void 0:globalThis.document){const n=Os(t);_.useEffect(()=>{const s=o=>{o.key==="Escape"&&n(o)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[n,e])}var mT="DismissableLayer",Jd="dismissableLayer.update",gT="dismissableLayer.pointerDownOutside",yT="dismissableLayer.focusOutside",dy,sx=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ix=_.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=t,p=_.useContext(sx),[g,v]=_.useState(null),w=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,T]=_.useState({}),R=Ns(e,q=>v(q)),b=Array.from(p.layers),[S]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),E=b.indexOf(S),k=g?b.indexOf(g):-1,P=p.layersWithOutsidePointerEventsDisabled.size>0,A=k>=E,F=xT(q=>{const U=q.target,Y=[...p.branches].some(ne=>ne.contains(U));!A||Y||(o==null||o(q),u==null||u(q),q.defaultPrevented||d==null||d())},w),B=wT(q=>{const U=q.target;[...p.branches].some(ne=>ne.contains(U))||(l==null||l(q),u==null||u(q),q.defaultPrevented||d==null||d())},w);return pT(q=>{k===p.layers.size-1&&(s==null||s(q),!q.defaultPrevented&&d&&(q.preventDefault(),d()))},w),_.useEffect(()=>{if(g)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(dy=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),fy(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=dy)}},[g,w,n,p]),_.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),fy())},[g,p]),_.useEffect(()=>{const q=()=>T({});return document.addEventListener(Jd,q),()=>document.removeEventListener(Jd,q)},[]),y.jsx(Un.div,{...f,ref:R,style:{pointerEvents:P?A?"auto":"none":void 0,...t.style},onFocusCapture:Kt(t.onFocusCapture,B.onFocusCapture),onBlurCapture:Kt(t.onBlurCapture,B.onBlurCapture),onPointerDownCapture:Kt(t.onPointerDownCapture,F.onPointerDownCapture)})});ix.displayName=mT;var vT="DismissableLayerBranch",ox=_.forwardRef((t,e)=>{const n=_.useContext(sx),s=_.useRef(null),o=Ns(e,s);return _.useEffect(()=>{const l=s.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),y.jsx(Un.div,{...t,ref:o})});ox.displayName=vT;function xT(t,e=globalThis==null?void 0:globalThis.document){const n=Os(t),s=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let f=function(){ax(gT,n,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=f,e.addEventListener("click",o.current,{once:!0})):f()}else e.removeEventListener("click",o.current);s.current=!1},u=window.setTimeout(()=>{e.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),e.removeEventListener("pointerdown",l),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>s.current=!0}}function wT(t,e=globalThis==null?void 0:globalThis.document){const n=Os(t),s=_.useRef(!1);return _.useEffect(()=>{const o=l=>{l.target&&!s.current&&ax(yT,n,{originalEvent:l},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function fy(){const t=new CustomEvent(Jd);document.dispatchEvent(t)}function ax(t,e,n,{discrete:s}){const o=n.originalEvent.target,l=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),s?rx(o,l):o.dispatchEvent(l)}var ST=ix,ET=ox,Ho=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},bT="Portal",lx=_.forwardRef((t,e)=>{var d;const{container:n,...s}=t,[o,l]=_.useState(!1);Ho(()=>l(!0),[]);const u=n||o&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return u?Zb.createPortal(y.jsx(Un.div,{...s,ref:e}),u):null});lx.displayName=bT;function TT(t,e){return _.useReducer((n,s)=>e[n][s]??n,t)}var ux=t=>{const{present:e,children:n}=t,s=_T(e),o=typeof n=="function"?n({present:s.isPresent}):_.Children.only(n),l=Ns(s.ref,CT(o));return typeof n=="function"||s.isPresent?_.cloneElement(o,{ref:l}):null};ux.displayName="Presence";function _T(t){const[e,n]=_.useState(),s=_.useRef(null),o=_.useRef(t),l=_.useRef("none"),u=t?"mounted":"unmounted",[d,f]=TT(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const p=kl(s.current);l.current=d==="mounted"?p:"none"},[d]),Ho(()=>{const p=s.current,g=o.current;if(g!==t){const w=l.current,T=kl(p);t?f("MOUNT"):T==="none"||(p==null?void 0:p.display)==="none"?f("UNMOUNT"):f(g&&w!==T?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,f]),Ho(()=>{if(e){let p;const g=e.ownerDocument.defaultView??window,v=T=>{const b=kl(s.current).includes(CSS.escape(T.animationName));if(T.target===e&&b&&(f("ANIMATION_END"),!o.current)){const S=e.style.animationFillMode;e.style.animationFillMode="forwards",p=g.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=S)})}},w=T=>{T.target===e&&(l.current=kl(s.current))};return e.addEventListener("animationstart",w),e.addEventListener("animationcancel",v),e.addEventListener("animationend",v),()=>{g.clearTimeout(p),e.removeEventListener("animationstart",w),e.removeEventListener("animationcancel",v),e.removeEventListener("animationend",v)}}else f("ANIMATION_END")},[e,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:_.useCallback(p=>{s.current=p?getComputedStyle(p):null,n(p)},[])}}function kl(t){return(t==null?void 0:t.animationName)||"none"}function CT(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var PT=ex[" useInsertionEffect ".trim().toString()]||Ho;function RT({prop:t,defaultProp:e,onChange:n=()=>{},caller:s}){const[o,l,u]=kT({defaultProp:e,onChange:n}),d=t!==void 0,f=d?t:o;{const g=_.useRef(t!==void 0);_.useEffect(()=>{const v=g.current;v!==d&&console.warn(`${s} is changing from ${v?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=d},[d,s])}const p=_.useCallback(g=>{var v;if(d){const w=AT(g)?g(t):g;w!==t&&((v=u.current)==null||v.call(u,w))}else l(g)},[d,t,l,u]);return[f,p]}function kT({defaultProp:t,onChange:e}){const[n,s]=_.useState(t),o=_.useRef(n),l=_.useRef(e);return PT(()=>{l.current=e},[e]),_.useEffect(()=>{var u;o.current!==n&&((u=l.current)==null||u.call(l,n),o.current=n)},[n,o]),[n,s,l]}function AT(t){return typeof t=="function"}var NT=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),OT="VisuallyHidden",eh=_.forwardRef((t,e)=>y.jsx(Un.span,{...t,ref:e,style:{...NT,...t.style}}));eh.displayName=OT;var th="ToastProvider",[nh,jT,DT]=oT("Toast"),[cx]=nx("Toast",[DT]),[LT,mu]=cx(th),dx=t=>{const{__scopeToast:e,label:n="Notification",duration:s=5e3,swipeDirection:o="right",swipeThreshold:l=50,children:u}=t,[d,f]=_.useState(null),[p,g]=_.useState(0),v=_.useRef(!1),w=_.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${th}\`. Expected non-empty \`string\`.`),y.jsx(nh.Provider,{scope:e,children:y.jsx(LT,{scope:e,label:n,duration:s,swipeDirection:o,swipeThreshold:l,toastCount:p,viewport:d,onViewportChange:f,onToastAdd:_.useCallback(()=>g(T=>T+1),[]),onToastRemove:_.useCallback(()=>g(T=>T-1),[]),isFocusedToastEscapeKeyDownRef:v,isClosePausedRef:w,children:u})})};dx.displayName=th;var fx="ToastViewport",MT=["F8"],Zd="toast.viewportPause",ef="toast.viewportResume",hx=_.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:s=MT,label:o="Notifications ({hotkey})",...l}=t,u=mu(fx,n),d=jT(n),f=_.useRef(null),p=_.useRef(null),g=_.useRef(null),v=_.useRef(null),w=Ns(e,v,u.onViewportChange),T=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=u.toastCount>0;_.useEffect(()=>{const S=E=>{var P;s.length!==0&&s.every(A=>E[A]||E.code===A)&&((P=v.current)==null||P.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[s]),_.useEffect(()=>{const S=f.current,E=v.current;if(R&&S&&E){const k=()=>{if(!u.isClosePausedRef.current){const B=new CustomEvent(Zd);E.dispatchEvent(B),u.isClosePausedRef.current=!0}},P=()=>{if(u.isClosePausedRef.current){const B=new CustomEvent(ef);E.dispatchEvent(B),u.isClosePausedRef.current=!1}},A=B=>{!S.contains(B.relatedTarget)&&P()},F=()=>{S.contains(document.activeElement)||P()};return S.addEventListener("focusin",k),S.addEventListener("focusout",A),S.addEventListener("pointermove",k),S.addEventListener("pointerleave",F),window.addEventListener("blur",k),window.addEventListener("focus",P),()=>{S.removeEventListener("focusin",k),S.removeEventListener("focusout",A),S.removeEventListener("pointermove",k),S.removeEventListener("pointerleave",F),window.removeEventListener("blur",k),window.removeEventListener("focus",P)}}},[R,u.isClosePausedRef]);const b=_.useCallback(({tabbingDirection:S})=>{const k=d().map(P=>{const A=P.ref.current,F=[A,...GT(A)];return S==="forwards"?F:F.reverse()});return(S==="forwards"?k.reverse():k).flat()},[d]);return _.useEffect(()=>{const S=v.current;if(S){const E=k=>{var F,B,q;const P=k.altKey||k.ctrlKey||k.metaKey;if(k.key==="Tab"&&!P){const U=document.activeElement,Y=k.shiftKey;if(k.target===S&&Y){(F=p.current)==null||F.focus();return}const Pe=b({tabbingDirection:Y?"backwards":"forwards"}),Ee=Pe.findIndex(Z=>Z===U);bd(Pe.slice(Ee+1))?k.preventDefault():Y?(B=p.current)==null||B.focus():(q=g.current)==null||q.focus()}};return S.addEventListener("keydown",E),()=>S.removeEventListener("keydown",E)}},[d,b]),y.jsxs(ET,{ref:f,role:"region","aria-label":o.replace("{hotkey}",T),tabIndex:-1,style:{pointerEvents:R?void 0:"none"},children:[R&&y.jsx(tf,{ref:p,onFocusFromOutsideViewport:()=>{const S=b({tabbingDirection:"forwards"});bd(S)}}),y.jsx(nh.Slot,{scope:n,children:y.jsx(Un.ol,{tabIndex:-1,...l,ref:w})}),R&&y.jsx(tf,{ref:g,onFocusFromOutsideViewport:()=>{const S=b({tabbingDirection:"backwards"});bd(S)}})]})});hx.displayName=fx;var px="ToastFocusProxy",tf=_.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:s,...o}=t,l=mu(px,n);return y.jsx(eh,{tabIndex:0,...o,ref:e,style:{position:"fixed"},onFocus:u=>{var p;const d=u.relatedTarget;!((p=l.viewport)!=null&&p.contains(d))&&s()}})});tf.displayName=px;var aa="Toast",IT="toast.swipeStart",FT="toast.swipeMove",UT="toast.swipeCancel",VT="toast.swipeEnd",mx=_.forwardRef((t,e)=>{const{forceMount:n,open:s,defaultOpen:o,onOpenChange:l,...u}=t,[d,f]=RT({prop:s,defaultProp:o??!0,onChange:l,caller:aa});return y.jsx(ux,{present:n||d,children:y.jsx($T,{open:d,...u,ref:e,onClose:()=>f(!1),onPause:Os(t.onPause),onResume:Os(t.onResume),onSwipeStart:Kt(t.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Kt(t.onSwipeMove,p=>{const{x:g,y:v}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:Kt(t.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Kt(t.onSwipeEnd,p=>{const{x:g,y:v}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),f(!1)})})})});mx.displayName=aa;var[BT,zT]=cx(aa,{onClose(){}}),$T=_.forwardRef((t,e)=>{const{__scopeToast:n,type:s="foreground",duration:o,open:l,onClose:u,onEscapeKeyDown:d,onPause:f,onResume:p,onSwipeStart:g,onSwipeMove:v,onSwipeCancel:w,onSwipeEnd:T,...R}=t,b=mu(aa,n),[S,E]=_.useState(null),k=Ns(e,Z=>E(Z)),P=_.useRef(null),A=_.useRef(null),F=o||b.duration,B=_.useRef(0),q=_.useRef(F),U=_.useRef(0),{onToastAdd:Y,onToastRemove:ne}=b,xe=Os(()=>{var Ce;(S==null?void 0:S.contains(document.activeElement))&&((Ce=b.viewport)==null||Ce.focus()),u()}),Pe=_.useCallback(Z=>{!Z||Z===1/0||(window.clearTimeout(U.current),B.current=new Date().getTime(),U.current=window.setTimeout(xe,Z))},[xe]);_.useEffect(()=>{const Z=b.viewport;if(Z){const Ce=()=>{Pe(q.current),p==null||p()},_e=()=>{const de=new Date().getTime()-B.current;q.current=q.current-de,window.clearTimeout(U.current),f==null||f()};return Z.addEventListener(Zd,_e),Z.addEventListener(ef,Ce),()=>{Z.removeEventListener(Zd,_e),Z.removeEventListener(ef,Ce)}}},[b.viewport,F,f,p,Pe]),_.useEffect(()=>{l&&!b.isClosePausedRef.current&&Pe(F)},[l,F,b.isClosePausedRef,Pe]),_.useEffect(()=>(Y(),()=>ne()),[Y,ne]);const Ee=_.useMemo(()=>S?Ex(S):null,[S]);return b.viewport?y.jsxs(y.Fragment,{children:[Ee&&y.jsx(WT,{__scopeToast:n,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:Ee}),y.jsx(BT,{scope:n,onClose:xe,children:Jf.createPortal(y.jsx(nh.ItemSlot,{scope:n,children:y.jsx(ST,{asChild:!0,onEscapeKeyDown:Kt(d,()=>{b.isFocusedToastEscapeKeyDownRef.current||xe(),b.isFocusedToastEscapeKeyDownRef.current=!1}),children:y.jsx(Un.li,{tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":b.swipeDirection,...R,ref:k,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Kt(t.onKeyDown,Z=>{Z.key==="Escape"&&(d==null||d(Z.nativeEvent),Z.nativeEvent.defaultPrevented||(b.isFocusedToastEscapeKeyDownRef.current=!0,xe()))}),onPointerDown:Kt(t.onPointerDown,Z=>{Z.button===0&&(P.current={x:Z.clientX,y:Z.clientY})}),onPointerMove:Kt(t.onPointerMove,Z=>{if(!P.current)return;const Ce=Z.clientX-P.current.x,_e=Z.clientY-P.current.y,de=!!A.current,Q=["left","right"].includes(b.swipeDirection),se=["left","up"].includes(b.swipeDirection)?Math.min:Math.max,z=Q?se(0,Ce):0,D=Q?0:se(0,_e),$=Z.pointerType==="touch"?10:2,fe={x:z,y:D},ye={originalEvent:Z,delta:fe};de?(A.current=fe,Al(FT,v,ye,{discrete:!1})):hy(fe,b.swipeDirection,$)?(A.current=fe,Al(IT,g,ye,{discrete:!1}),Z.target.setPointerCapture(Z.pointerId)):(Math.abs(Ce)>$||Math.abs(_e)>$)&&(P.current=null)}),onPointerUp:Kt(t.onPointerUp,Z=>{const Ce=A.current,_e=Z.target;if(_e.hasPointerCapture(Z.pointerId)&&_e.releasePointerCapture(Z.pointerId),A.current=null,P.current=null,Ce){const de=Z.currentTarget,Q={originalEvent:Z,delta:Ce};hy(Ce,b.swipeDirection,b.swipeThreshold)?Al(VT,T,Q,{discrete:!0}):Al(UT,w,Q,{discrete:!0}),de.addEventListener("click",se=>se.preventDefault(),{once:!0})}})})})}),b.viewport)})]}):null}),WT=t=>{const{__scopeToast:e,children:n,...s}=t,o=mu(aa,e),[l,u]=_.useState(!1),[d,f]=_.useState(!1);return KT(()=>u(!0)),_.useEffect(()=>{const p=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(p)},[]),d?null:y.jsx(lx,{asChild:!0,children:y.jsx(eh,{...s,children:l&&y.jsxs(y.Fragment,{children:[o.label," ",n]})})})},HT="ToastTitle",gx=_.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t;return y.jsx(Un.div,{...s,ref:e})});gx.displayName=HT;var qT="ToastDescription",yx=_.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t;return y.jsx(Un.div,{...s,ref:e})});yx.displayName=qT;var vx="ToastAction",xx=_.forwardRef((t,e)=>{const{altText:n,...s}=t;return n.trim()?y.jsx(Sx,{altText:n,asChild:!0,children:y.jsx(rh,{...s,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${vx}\`. Expected non-empty \`string\`.`),null)});xx.displayName=vx;var wx="ToastClose",rh=_.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t,o=zT(wx,n);return y.jsx(Sx,{asChild:!0,children:y.jsx(Un.button,{type:"button",...s,ref:e,onClick:Kt(t.onClick,o.onClose)})})});rh.displayName=wx;var Sx=_.forwardRef((t,e)=>{const{__scopeToast:n,altText:s,...o}=t;return y.jsx(Un.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...o,ref:e})});function Ex(t){const e=[];return Array.from(t.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&e.push(s.textContent),QT(s)){const o=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!o)if(l){const u=s.dataset.radixToastAnnounceAlt;u&&e.push(u)}else e.push(...Ex(s))}}),e}function Al(t,e,n,{discrete:s}){const o=n.originalEvent.currentTarget,l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),s?rx(o,l):o.dispatchEvent(l)}var hy=(t,e,n=0)=>{const s=Math.abs(t.x),o=Math.abs(t.y),l=s>o;return e==="left"||e==="right"?l&&s>n:!l&&o>n};function KT(t=()=>{}){const e=Os(t);Ho(()=>{let n=0,s=0;return n=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(s)}},[e])}function QT(t){return t.nodeType===t.ELEMENT_NODE}function GT(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function bd(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var XT=dx,bx=hx,Tx=mx,_x=gx,Cx=yx,Px=xx,Rx=rh;function kx(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;etypeof t=="boolean"?`${t}`:t===0?"0":t,my=Ax,YT=(t,e)=>n=>{var s;if((e==null?void 0:e.variants)==null)return my(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=e,u=Object.keys(o).map(p=>{const g=n==null?void 0:n[p],v=l==null?void 0:l[p];if(g===null)return null;const w=py(g)||py(v);return o[p][w]}),d=n&&Object.entries(n).reduce((p,g)=>{let[v,w]=g;return w===void 0||(p[v]=w),p},{}),f=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((p,g)=>{let{class:v,className:w,...T}=g;return Object.entries(T).every(R=>{let[b,S]=R;return Array.isArray(S)?S.includes({...l,...d}[b]):{...l,...d}[b]===S})?[...p,v,w]:p},[]);return my(t,u,f,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const JT=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Nx=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ZT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const e_=_.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:l,iconNode:u,...d},f)=>_.createElement("svg",{ref:f,...ZT,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:Nx("lucide",o),...d},[...u.map(([p,g])=>_.createElement(p,g)),...Array.isArray(l)?l:[l]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const t_=(t,e)=>{const n=_.forwardRef(({className:s,...o},l)=>_.createElement(e_,{ref:l,iconNode:e,className:Nx(`lucide-${JT(t)}`,s),...o}));return n.displayName=`${t}`,n};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const n_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],r_=t_("X",n_),s_=(t,e)=>{const n=new Array(t.length+e.length);for(let s=0;s({classGroupId:t,validator:e}),Ox=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),tu="-",gy=[],o_="arbitrary..",a_=t=>{const e=u_(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return l_(u);const d=u.split(tu),f=d[0]===""&&d.length>1?1:0;return jx(d,f,e)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=s[u],p=n[u];return f?p?s_(p,f):f:p||gy}return n[u]||gy}}},jx=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],l=n.nextPart.get(o);if(l){const p=jx(t,e+1,l);if(p)return p}const u=n.validators;if(u===null)return;const d=e===0?t.join(tu):t.slice(e).join(tu),f=u.length;for(let p=0;pt.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),s=e.slice(0,n);return s?o_+s:void 0})(),u_=t=>{const{theme:e,classGroups:n}=t;return c_(n,e)},c_=(t,e)=>{const n=Ox();for(const s in t){const o=t[s];sh(o,n,s,e)}return n},sh=(t,e,n,s)=>{const o=t.length;for(let l=0;l{if(typeof t=="string"){f_(t,e,n);return}if(typeof t=="function"){h_(t,e,n,s);return}p_(t,e,n,s)},f_=(t,e,n)=>{const s=t===""?e:Dx(e,t);s.classGroupId=n},h_=(t,e,n,s)=>{if(m_(t)){sh(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(i_(n,t))},p_=(t,e,n,s)=>{const o=Object.entries(t),l=o.length;for(let u=0;u{let n=t;const s=e.split(tu),o=s.length;for(let l=0;l"isThemeGetter"in t&&t.isThemeGetter===!0,g_=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),s=Object.create(null);const o=(l,u)=>{n[l]=u,e++,e>t&&(e=0,s=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=s[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},nf="!",yy=":",y_=[],vy=(t,e,n,s,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:o}),v_=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=o=>{const l=[];let u=0,d=0,f=0,p;const g=o.length;for(let b=0;bf?p-f:void 0;return vy(l,T,w,R)};if(e){const o=e+yy,l=s;s=u=>u.startsWith(o)?l(u.slice(o.length)):vy(y_,!1,u,void 0,!0)}if(n){const o=s;s=l=>n({className:l,parseClassName:o})}return s},x_=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{e.set(n,1e6+s)}),n=>{const s=[];let o=[];for(let l=0;l0&&(o.sort(),s.push(...o),o=[]),s.push(u)):o.push(u)}return o.length>0&&(o.sort(),s.push(...o)),s}},w_=t=>({cache:g_(t.cacheSize),parseClassName:v_(t),sortModifiers:x_(t),...a_(t)}),S_=/\s+/,E_=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:l}=e,u=[],d=t.trim().split(S_);let f="";for(let p=d.length-1;p>=0;p-=1){const g=d[p],{isExternal:v,modifiers:w,hasImportantModifier:T,baseClassName:R,maybePostfixModifierPosition:b}=n(g);if(v){f=g+(f.length>0?" "+f:f);continue}let S=!!b,E=s(S?R.substring(0,b):R);if(!E){if(!S){f=g+(f.length>0?" "+f:f);continue}if(E=s(R),!E){f=g+(f.length>0?" "+f:f);continue}S=!1}const k=w.length===0?"":w.length===1?w[0]:l(w).join(":"),P=T?k+nf:k,A=P+E;if(u.indexOf(A)>-1)continue;u.push(A);const F=o(E,S);for(let B=0;B0?" "+f:f)}return f},b_=(...t)=>{let e=0,n,s,o="";for(;e{if(typeof t=="string")return t;let e,n="";for(let s=0;s{let n,s,o,l;const u=f=>{const p=e.reduce((g,v)=>v(g),t());return n=w_(p),s=n.cache.get,o=n.cache.set,l=d,d(f)},d=f=>{const p=s(f);if(p)return p;const g=E_(f,n);return o(f,g),g};return l=u,(...f)=>l(b_(...f))},__=[],ot=t=>{const e=n=>n[t]||__;return e.isThemeGetter=!0,e},Mx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ix=/^\((?:(\w[\w-]*):)?(.+)\)$/i,C_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,P_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,R_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,k_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,A_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,N_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_r=t=>C_.test(t),Re=t=>!!t&&!Number.isNaN(Number(t)),Cr=t=>!!t&&Number.isInteger(Number(t)),Td=t=>t.endsWith("%")&&Re(t.slice(0,-1)),Gn=t=>P_.test(t),Fx=()=>!0,O_=t=>R_.test(t)&&!k_.test(t),ih=()=>!1,j_=t=>A_.test(t),D_=t=>N_.test(t),L_=t=>!oe(t)&&!ae(t),M_=t=>Wr(t,Bx,ih),oe=t=>Mx.test(t),cs=t=>Wr(t,zx,O_),xy=t=>Wr(t,W_,Re),I_=t=>Wr(t,Wx,Fx),F_=t=>Wr(t,$x,ih),wy=t=>Wr(t,Ux,ih),U_=t=>Wr(t,Vx,D_),Nl=t=>Wr(t,Hx,j_),ae=t=>Ix.test(t),Co=t=>Is(t,zx),V_=t=>Is(t,$x),Sy=t=>Is(t,Ux),B_=t=>Is(t,Bx),z_=t=>Is(t,Vx),Ol=t=>Is(t,Hx,!0),$_=t=>Is(t,Wx,!0),Wr=(t,e,n)=>{const s=Mx.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Is=(t,e,n=!1)=>{const s=Ix.exec(t);return s?s[1]?e(s[1]):n:!1},Ux=t=>t==="position"||t==="percentage",Vx=t=>t==="image"||t==="url",Bx=t=>t==="length"||t==="size"||t==="bg-size",zx=t=>t==="length",W_=t=>t==="number",$x=t=>t==="family-name",Wx=t=>t==="number"||t==="weight",Hx=t=>t==="shadow",H_=()=>{const t=ot("color"),e=ot("font"),n=ot("text"),s=ot("font-weight"),o=ot("tracking"),l=ot("leading"),u=ot("breakpoint"),d=ot("container"),f=ot("spacing"),p=ot("radius"),g=ot("shadow"),v=ot("inset-shadow"),w=ot("text-shadow"),T=ot("drop-shadow"),R=ot("blur"),b=ot("perspective"),S=ot("aspect"),E=ot("ease"),k=ot("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...A(),ae,oe],B=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],U=()=>[ae,oe,f],Y=()=>[_r,"full","auto",...U()],ne=()=>[Cr,"none","subgrid",ae,oe],xe=()=>["auto",{span:["full",Cr,ae,oe]},Cr,ae,oe],Pe=()=>[Cr,"auto",ae,oe],Ee=()=>["auto","min","max","fr",ae,oe],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ce=()=>["start","end","center","stretch","center-safe","end-safe"],_e=()=>["auto",...U()],de=()=>[_r,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],Q=()=>[_r,"screen","full","dvw","lvw","svw","min","max","fit",...U()],se=()=>[_r,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],z=()=>[t,ae,oe],D=()=>[...A(),Sy,wy,{position:[ae,oe]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",B_,M_,{size:[ae,oe]}],ye=()=>[Td,Co,cs],me=()=>["","none","full",p,ae,oe],X=()=>["",Re,Co,cs],be=()=>["solid","dashed","dotted","double"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>[Re,Td,Sy,wy],at=()=>["","none",R,ae,oe],Xt=()=>["none",Re,ae,oe],ft=()=>["none",Re,ae,oe],fn=()=>[Re,ae,oe],Yt=()=>[_r,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gn],breakpoint:[Gn],color:[Fx],container:[Gn],"drop-shadow":[Gn],ease:["in","out","in-out"],font:[L_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gn],shadow:[Gn],spacing:["px",Re],text:[Gn],"text-shadow":[Gn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_r,oe,ae,S]}],container:["container"],columns:[{columns:[Re,oe,ae,d]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Cr,"auto",ae,oe]}],basis:[{basis:[_r,"full","auto",d,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,_r,"auto","initial","none",oe]}],grow:[{grow:["",Re,ae,oe]}],shrink:[{shrink:["",Re,ae,oe]}],order:[{order:[Cr,"first","last","none",ae,oe]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:xe()}],"col-start":[{"col-start":Pe()}],"col-end":[{"col-end":Pe()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:xe()}],"row-start":[{"row-start":Pe()}],"row-end":[{"row-end":Pe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ee()}],"auto-rows":[{"auto-rows":Ee()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...Ce(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ce()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...Ce(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ce(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...Ce(),"baseline"]}],"place-self":[{"place-self":["auto",...Ce()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:_e()}],mx:[{mx:_e()}],my:[{my:_e()}],ms:[{ms:_e()}],me:[{me:_e()}],mbs:[{mbs:_e()}],mbe:[{mbe:_e()}],mt:[{mt:_e()}],mr:[{mr:_e()}],mb:[{mb:_e()}],ml:[{ml:_e()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:de()}],"inline-size":[{inline:["auto",...Q()]}],"min-inline-size":[{"min-inline":["auto",...Q()]}],"max-inline-size":[{"max-inline":["none",...Q()]}],"block-size":[{block:["auto",...se()]}],"min-block-size":[{"min-block":["auto",...se()]}],"max-block-size":[{"max-block":["none",...se()]}],w:[{w:[d,"screen",...de()]}],"min-w":[{"min-w":[d,"screen","none",...de()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...de()]}],h:[{h:["screen","lh",...de()]}],"min-h":[{"min-h":["screen","lh","none",...de()]}],"max-h":[{"max-h":["screen","lh",...de()]}],"font-size":[{text:["base",n,Co,cs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,$_,I_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Td,oe]}],"font-family":[{font:[V_,F_,e]}],"font-features":[{"font-features":[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ae,oe]}],"line-clamp":[{"line-clamp":[Re,"none",ae,xy]}],leading:[{leading:[l,...U()]}],"list-image":[{"list-image":["none",ae,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",ae,cs]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Re,"auto",ae,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Cr,ae,oe],radial:["",ae,oe],conic:[Cr,ae,oe]},z_,U_]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:ye()}],"gradient-via-pos":[{via:ye()}],"gradient-to-pos":[{to:ye()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,ae,oe]}],"outline-w":[{outline:["",Re,Co,cs]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",g,Ol,Nl]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",v,Ol,Nl]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Re,cs]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",w,Ol,Nl]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Re,ae,oe]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":Se()}],"mask-image-linear-to-pos":[{"mask-linear-to":Se()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":Se()}],"mask-image-t-to-pos":[{"mask-t-to":Se()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":Se()}],"mask-image-r-to-pos":[{"mask-r-to":Se()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":Se()}],"mask-image-b-to-pos":[{"mask-b-to":Se()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":Se()}],"mask-image-l-to-pos":[{"mask-l-to":Se()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":Se()}],"mask-image-x-to-pos":[{"mask-x-to":Se()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":Se()}],"mask-image-y-to-pos":[{"mask-y-to":Se()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ae,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Se()}],"mask-image-radial-to-pos":[{"mask-radial-to":Se()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":Se()}],"mask-image-conic-to-pos":[{"mask-conic-to":Se()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,oe]}],filter:[{filter:["","none",ae,oe]}],blur:[{blur:at()}],brightness:[{brightness:[Re,ae,oe]}],contrast:[{contrast:[Re,ae,oe]}],"drop-shadow":[{"drop-shadow":["","none",T,Ol,Nl]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Re,ae,oe]}],"hue-rotate":[{"hue-rotate":[Re,ae,oe]}],invert:[{invert:["",Re,ae,oe]}],saturate:[{saturate:[Re,ae,oe]}],sepia:[{sepia:["",Re,ae,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,oe]}],"backdrop-blur":[{"backdrop-blur":at()}],"backdrop-brightness":[{"backdrop-brightness":[Re,ae,oe]}],"backdrop-contrast":[{"backdrop-contrast":[Re,ae,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,ae,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,ae,oe]}],"backdrop-invert":[{"backdrop-invert":["",Re,ae,oe]}],"backdrop-opacity":[{"backdrop-opacity":[Re,ae,oe]}],"backdrop-saturate":[{"backdrop-saturate":[Re,ae,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,ae,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",ae,oe]}],ease:[{ease:["linear","initial",E,ae,oe]}],delay:[{delay:[Re,ae,oe]}],animate:[{animate:["none",k,ae,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ae,oe]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:Xt()}],"rotate-x":[{"rotate-x":Xt()}],"rotate-y":[{"rotate-y":Xt()}],"rotate-z":[{"rotate-z":Xt()}],scale:[{scale:ft()}],"scale-x":[{"scale-x":ft()}],"scale-y":[{"scale-y":ft()}],"scale-z":[{"scale-z":ft()}],"scale-3d":["scale-3d"],skew:[{skew:fn()}],"skew-x":[{"skew-x":fn()}],"skew-y":[{"skew-y":fn()}],transform:[{transform:[ae,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Yt()}],"translate-x":[{"translate-x":Yt()}],"translate-y":[{"translate-y":Yt()}],"translate-z":[{"translate-z":Yt()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,oe]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[Re,Co,cs,xy]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},q_=T_(H_);function Hr(...t){return q_(Ax(t))}const K_=XT,qx=_.forwardRef(({className:t,...e},n)=>y.jsx(bx,{ref:n,className:Hr("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));qx.displayName=bx.displayName;const Q_=YT("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Kx=_.forwardRef(({className:t,variant:e,...n},s)=>y.jsx(Tx,{ref:s,className:Hr(Q_({variant:e}),t),...n}));Kx.displayName=Tx.displayName;const G_=_.forwardRef(({className:t,...e},n)=>y.jsx(Px,{ref:n,className:Hr("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));G_.displayName=Px.displayName;const Qx=_.forwardRef(({className:t,...e},n)=>y.jsx(Rx,{ref:n,className:Hr("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:y.jsx(r_,{className:"h-4 w-4"})}));Qx.displayName=Rx.displayName;const Gx=_.forwardRef(({className:t,...e},n)=>y.jsx(_x,{ref:n,className:Hr("text-sm font-semibold",t),...e}));Gx.displayName=_x.displayName;const Xx=_.forwardRef(({className:t,...e},n)=>y.jsx(Cx,{ref:n,className:Hr("text-sm opacity-90",t),...e}));Xx.displayName=Cx.displayName;function X_(){const{toasts:t}=Jb();return y.jsxs(K_,{children:[t.map(function({id:e,title:n,description:s,action:o,...l}){return y.jsxs(Kx,{...l,children:[y.jsxs("div",{className:"grid gap-1",children:[n&&y.jsx(Gx,{children:n}),s&&y.jsx(Xx,{children:s})]}),o,y.jsx(Qx,{})]},e)}),y.jsx(qx,{})]})}var la=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Y_={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Ar,Gf,$0,J_=($0=class{constructor(){ge(this,Ar,Y_);ge(this,Gf,!1)}setTimeoutProvider(t){te(this,Ar,t)}setTimeout(t,e){return O(this,Ar).setTimeout(t,e)}clearTimeout(t){O(this,Ar).clearTimeout(t)}setInterval(t,e){return O(this,Ar).setInterval(t,e)}clearInterval(t){O(this,Ar).clearInterval(t)}},Ar=new WeakMap,Gf=new WeakMap,$0),gs=new J_;function Z_(t){setTimeout(t,0)}var js=typeof window>"u"||"Deno"in globalThis;function Ut(){}function eC(t,e){return typeof t=="function"?t(e):t}function rf(t){return typeof t=="number"&&t>=0&&t!==1/0}function Yx(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ur(t,e){return typeof t=="function"?t(e):t}function un(t,e){return typeof t=="function"?t(e):t}function Ey(t,e){const{type:n="all",exact:s,fetchStatus:o,predicate:l,queryKey:u,stale:d}=t;if(u){if(s){if(e.queryHash!==oh(u,e.options))return!1}else if(!Ko(e.queryKey,u))return!1}if(n!=="all"){const f=e.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&e.isStale()!==d||o&&o!==e.state.fetchStatus||l&&!l(e))}function by(t,e){const{exact:n,status:s,predicate:o,mutationKey:l}=t;if(l){if(!e.options.mutationKey)return!1;if(n){if(qo(e.options.mutationKey)!==qo(l))return!1}else if(!Ko(e.options.mutationKey,l))return!1}return!(s&&e.state.status!==s||o&&!o(e))}function oh(t,e){return((e==null?void 0:e.queryKeyHashFn)||qo)(t)}function qo(t){return JSON.stringify(t,(e,n)=>of(n)?Object.keys(n).sort().reduce((s,o)=>(s[o]=n[o],s),{}):n)}function Ko(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ko(t[n],e[n])):!1}var tC=Object.prototype.hasOwnProperty;function Jx(t,e,n=0){if(t===e)return t;if(n>500)return e;const s=Ty(t)&&Ty(e);if(!s&&!(of(t)&&of(e)))return e;const l=(s?t:Object.keys(t)).length,u=s?e:Object.keys(e),d=u.length,f=s?new Array(d):{};let p=0;for(let g=0;g{gs.setTimeout(e,t)})}function af(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Jx(t,e):e}function rC(t,e,n=0){const s=[...t,e];return n&&s.length>n?s.slice(1):s}function sC(t,e,n=0){const s=[e,...t];return n&&s.length>n?s.slice(0,-1):s}var ah=Symbol();function Zx(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===ah?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function ew(t,e){return typeof t=="function"?t(...e):!!t}function iC(t,e,n){let s=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??(o=e()),s||(s=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),t}var xs,Nr,gi,W0,oC=(W0=class extends la{constructor(){super();ge(this,xs);ge(this,Nr);ge(this,gi);te(this,gi,e=>{if(!js&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){O(this,Nr)||this.setEventListener(O(this,gi))}onUnsubscribe(){var e;this.hasListeners()||((e=O(this,Nr))==null||e.call(this),te(this,Nr,void 0))}setEventListener(e){var n;te(this,gi,e),(n=O(this,Nr))==null||n.call(this),te(this,Nr,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){O(this,xs)!==e&&(te(this,xs,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof O(this,xs)=="boolean"?O(this,xs):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},xs=new WeakMap,Nr=new WeakMap,gi=new WeakMap,W0),lh=new oC;function lf(){let t,e;const n=new Promise((o,l)=>{t=o,e=l});n.status="pending",n.catch(()=>{});function s(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{s({status:"fulfilled",value:o}),t(o)},n.reject=o=>{s({status:"rejected",reason:o}),e(o)},n}var aC=Z_;function lC(){let t=[],e=0,n=d=>{d()},s=d=>{d()},o=aC;const l=d=>{e?t.push(d):o(()=>{n(d)})},u=()=>{const d=t;t=[],d.length&&o(()=>{s(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;e++;try{f=d()}finally{e--,e||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}var vt=lC(),yi,Or,vi,H0,uC=(H0=class extends la{constructor(){super();ge(this,yi,!0);ge(this,Or);ge(this,vi);te(this,vi,e=>{if(!js&&window.addEventListener){const n=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){O(this,Or)||this.setEventListener(O(this,vi))}onUnsubscribe(){var e;this.hasListeners()||((e=O(this,Or))==null||e.call(this),te(this,Or,void 0))}setEventListener(e){var n;te(this,vi,e),(n=O(this,Or))==null||n.call(this),te(this,Or,e(this.setOnline.bind(this)))}setOnline(e){O(this,yi)!==e&&(te(this,yi,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return O(this,yi)}},yi=new WeakMap,Or=new WeakMap,vi=new WeakMap,H0),nu=new uC;function cC(t){return Math.min(1e3*2**t,3e4)}function tw(t){return(t??"online")==="online"?nu.isOnline():!0}var uf=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function nw(t){let e=!1,n=0,s;const o=lf(),l=()=>o.status!=="pending",u=b=>{var S;if(!l()){const E=new uf(b);w(E),(S=t.onCancel)==null||S.call(t,E)}},d=()=>{e=!0},f=()=>{e=!1},p=()=>lh.isFocused()&&(t.networkMode==="always"||nu.isOnline())&&t.canRun(),g=()=>tw(t.networkMode)&&t.canRun(),v=b=>{l()||(s==null||s(),o.resolve(b))},w=b=>{l()||(s==null||s(),o.reject(b))},T=()=>new Promise(b=>{var S;s=E=>{(l()||p())&&b(E)},(S=t.onPause)==null||S.call(t)}).then(()=>{var b;s=void 0,l()||(b=t.onContinue)==null||b.call(t)}),R=()=>{if(l())return;let b;const S=n===0?t.initialPromise:void 0;try{b=S??t.fn()}catch(E){b=Promise.reject(E)}Promise.resolve(b).then(v).catch(E=>{var B;if(l())return;const k=t.retry??(js?0:3),P=t.retryDelay??cC,A=typeof P=="function"?P(n,E):P,F=k===!0||typeof k=="number"&&np()?void 0:T()).then(()=>{e?w(E):R()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(s==null||s(),o),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?R():T().then(R),o)}}var ws,q0,rw=(q0=class{constructor(){ge(this,ws)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rf(this.gcTime)&&te(this,ws,gs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(js?1/0:300*1e3))}clearGcTimeout(){O(this,ws)&&(gs.clearTimeout(O(this,ws)),te(this,ws,void 0))}},ws=new WeakMap,q0),Ss,xi,ln,Es,dt,na,bs,bn,Xn,K0,dC=(K0=class extends rw{constructor(e){super();ge(this,bn);ge(this,Ss);ge(this,xi);ge(this,ln);ge(this,Es);ge(this,dt);ge(this,na);ge(this,bs);te(this,bs,!1),te(this,na,e.defaultOptions),this.setOptions(e.options),this.observers=[],te(this,Es,e.client),te(this,ln,O(this,Es).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,te(this,Ss,Py(this.options)),this.state=e.state??O(this,Ss),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=O(this,dt))==null?void 0:e.promise}setOptions(e){if(this.options={...O(this,na),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Py(this.options);n.data!==void 0&&(this.setState(Cy(n.data,n.dataUpdatedAt)),te(this,Ss,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,ln).remove(this)}setData(e,n){const s=af(this.state.data,e,this.options);return Ne(this,bn,Xn).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(e,n){Ne(this,bn,Xn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var s,o;const n=(s=O(this,dt))==null?void 0:s.promise;return(o=O(this,dt))==null||o.cancel(e),n?n.then(Ut).catch(Ut):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,Ss))}isActive(){return this.observers.some(e=>un(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ah||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ur(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Yx(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=O(this,dt))==null||n.continue()}onOnline(){var n;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=O(this,dt))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),O(this,ln).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(O(this,dt)&&(O(this,bs)?O(this,dt).cancel({revert:!0}):O(this,dt).cancelRetry()),this.scheduleGc()),O(this,ln).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ne(this,bn,Xn).call(this,{type:"invalidate"})}async fetch(e,n){var f,p,g,v,w,T,R,b,S,E,k,P;if(this.state.fetchStatus!=="idle"&&((f=O(this,dt))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(O(this,dt))return O(this,dt).continueRetry(),O(this,dt).promise}if(e&&this.setOptions(e),!this.options.queryFn){const A=this.observers.find(F=>F.options.queryFn);A&&this.setOptions(A.options)}const s=new AbortController,o=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(te(this,bs,!0),s.signal)})},l=()=>{const A=Zx(this.options,n),B=(()=>{const q={client:O(this,Es),queryKey:this.queryKey,meta:this.meta};return o(q),q})();return te(this,bs,!1),this.options.persister?this.options.persister(A,B,this):A(B)},d=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:O(this,Es),state:this.state,fetchFn:l};return o(A),A})();(p=this.options.behavior)==null||p.onFetch(d,this),te(this,xi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=d.fetchOptions)==null?void 0:g.meta))&&Ne(this,bn,Xn).call(this,{type:"fetch",meta:(v=d.fetchOptions)==null?void 0:v.meta}),te(this,dt,nw({initialPromise:n==null?void 0:n.initialPromise,fn:d.fetchFn,onCancel:A=>{A instanceof uf&&A.revert&&this.setState({...O(this,xi),fetchStatus:"idle"}),s.abort()},onFail:(A,F)=>{Ne(this,bn,Xn).call(this,{type:"failed",failureCount:A,error:F})},onPause:()=>{Ne(this,bn,Xn).call(this,{type:"pause"})},onContinue:()=>{Ne(this,bn,Xn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const A=await O(this,dt).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(T=(w=O(this,ln).config).onSuccess)==null||T.call(w,A,this),(b=(R=O(this,ln).config).onSettled)==null||b.call(R,A,this.state.error,this),A}catch(A){if(A instanceof uf){if(A.silent)return O(this,dt).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ne(this,bn,Xn).call(this,{type:"error",error:A}),(E=(S=O(this,ln).config).onError)==null||E.call(S,A,this),(P=(k=O(this,ln).config).onSettled)==null||P.call(k,this.state.data,A,this),A}finally{this.scheduleGc()}}},Ss=new WeakMap,xi=new WeakMap,ln=new WeakMap,Es=new WeakMap,dt=new WeakMap,na=new WeakMap,bs=new WeakMap,bn=new WeakSet,Xn=function(e){const n=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...sw(s.data,this.options),fetchMeta:e.meta??null};case"success":const o={...s,...Cy(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return te(this,xi,e.manual?o:void 0),o;case"error":const l=e.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=n(this.state),vt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),O(this,ln).notify({query:this,type:"updated",action:e})})},K0);function sw(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tw(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Cy(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Py(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,s=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ft,Oe,ra,Nt,Ts,wi,Jn,jr,sa,Si,Ei,_s,Cs,Dr,bi,Ie,No,cf,df,ff,hf,pf,mf,gf,iw,Q0,fC=(Q0=class extends la{constructor(e,n){super();ge(this,Ie);ge(this,Ft);ge(this,Oe);ge(this,ra);ge(this,Nt);ge(this,Ts);ge(this,wi);ge(this,Jn);ge(this,jr);ge(this,sa);ge(this,Si);ge(this,Ei);ge(this,_s);ge(this,Cs);ge(this,Dr);ge(this,bi,new Set);this.options=n,te(this,Ft,e),te(this,jr,null),te(this,Jn,lf()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,Oe).addObserver(this),Ry(O(this,Oe),this.options)?Ne(this,Ie,No).call(this):this.updateResult(),Ne(this,Ie,hf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yf(O(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yf(O(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ne(this,Ie,pf).call(this),Ne(this,Ie,mf).call(this),O(this,Oe).removeObserver(this)}setOptions(e){const n=this.options,s=O(this,Oe);if(this.options=O(this,Ft).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof un(this.options.enabled,O(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ne(this,Ie,gf).call(this),O(this,Oe).setOptions(this.options),n._defaulted&&!sf(this.options,n)&&O(this,Ft).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,Oe),observer:this});const o=this.hasListeners();o&&ky(O(this,Oe),s,this.options,n)&&Ne(this,Ie,No).call(this),this.updateResult(),o&&(O(this,Oe)!==s||un(this.options.enabled,O(this,Oe))!==un(n.enabled,O(this,Oe))||Ur(this.options.staleTime,O(this,Oe))!==Ur(n.staleTime,O(this,Oe)))&&Ne(this,Ie,cf).call(this);const l=Ne(this,Ie,df).call(this);o&&(O(this,Oe)!==s||un(this.options.enabled,O(this,Oe))!==un(n.enabled,O(this,Oe))||l!==O(this,Dr))&&Ne(this,Ie,ff).call(this,l)}getOptimisticResult(e){const n=O(this,Ft).getQueryCache().build(O(this,Ft),e),s=this.createResult(n,e);return pC(this,s)&&(te(this,Nt,s),te(this,wi,this.options),te(this,Ts,O(this,Oe).state)),s}getCurrentResult(){return O(this,Nt)}trackResult(e,n){return new Proxy(e,{get:(s,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&O(this,Jn).status==="pending"&&O(this,Jn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,o))})}trackProp(e){O(this,bi).add(e)}getCurrentQuery(){return O(this,Oe)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=O(this,Ft).defaultQueryOptions(e),s=O(this,Ft).getQueryCache().build(O(this,Ft),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(e){return Ne(this,Ie,No).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,Nt)))}createResult(e,n){var Y;const s=O(this,Oe),o=this.options,l=O(this,Nt),u=O(this,Ts),d=O(this,wi),p=e!==s?e.state:O(this,ra),{state:g}=e;let v={...g},w=!1,T;if(n._optimisticResults){const ne=this.hasListeners(),xe=!ne&&Ry(e,n),Pe=ne&&ky(e,s,n,o);(xe||Pe)&&(v={...v,...sw(g.data,e.options)}),n._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:R,errorUpdatedAt:b,status:S}=v;T=v.data;let E=!1;if(n.placeholderData!==void 0&&T===void 0&&S==="pending"){let ne;l!=null&&l.isPlaceholderData&&n.placeholderData===(d==null?void 0:d.placeholderData)?(ne=l.data,E=!0):ne=typeof n.placeholderData=="function"?n.placeholderData((Y=O(this,Ei))==null?void 0:Y.state.data,O(this,Ei)):n.placeholderData,ne!==void 0&&(S="success",T=af(l==null?void 0:l.data,ne,n),w=!0)}if(n.select&&T!==void 0&&!E)if(l&&T===(u==null?void 0:u.data)&&n.select===O(this,sa))T=O(this,Si);else try{te(this,sa,n.select),T=n.select(T),T=af(l==null?void 0:l.data,T,n),te(this,Si,T),te(this,jr,null)}catch(ne){te(this,jr,ne)}O(this,jr)&&(R=O(this,jr),T=O(this,Si),b=Date.now(),S="error");const k=v.fetchStatus==="fetching",P=S==="pending",A=S==="error",F=P&&k,B=T!==void 0,U={status:S,fetchStatus:v.fetchStatus,isPending:P,isSuccess:S==="success",isError:A,isInitialLoading:F,isLoading:F,data:T,dataUpdatedAt:v.dataUpdatedAt,error:R,errorUpdatedAt:b,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>p.dataUpdateCount||v.errorUpdateCount>p.errorUpdateCount,isFetching:k,isRefetching:k&&!P,isLoadingError:A&&!B,isPaused:v.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:A&&B,isStale:uh(e,n),refetch:this.refetch,promise:O(this,Jn),isEnabled:un(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const ne=U.data!==void 0,xe=U.status==="error"&&!ne,Pe=Ce=>{xe?Ce.reject(U.error):ne&&Ce.resolve(U.data)},Ee=()=>{const Ce=te(this,Jn,U.promise=lf());Pe(Ce)},Z=O(this,Jn);switch(Z.status){case"pending":e.queryHash===s.queryHash&&Pe(Z);break;case"fulfilled":(xe||U.data!==Z.value)&&Ee();break;case"rejected":(!xe||U.error!==Z.reason)&&Ee();break}}return U}updateResult(){const e=O(this,Nt),n=this.createResult(O(this,Oe),this.options);if(te(this,Ts,O(this,Oe).state),te(this,wi,this.options),O(this,Ts).data!==void 0&&te(this,Ei,O(this,Oe)),sf(n,e))return;te(this,Nt,n);const s=()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!O(this,bi).size)return!0;const u=new Set(l??O(this,bi));return this.options.throwOnError&&u.add("error"),Object.keys(O(this,Nt)).some(d=>{const f=d;return O(this,Nt)[f]!==e[f]&&u.has(f)})};Ne(this,Ie,iw).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ne(this,Ie,hf).call(this)}},Ft=new WeakMap,Oe=new WeakMap,ra=new WeakMap,Nt=new WeakMap,Ts=new WeakMap,wi=new WeakMap,Jn=new WeakMap,jr=new WeakMap,sa=new WeakMap,Si=new WeakMap,Ei=new WeakMap,_s=new WeakMap,Cs=new WeakMap,Dr=new WeakMap,bi=new WeakMap,Ie=new WeakSet,No=function(e){Ne(this,Ie,gf).call(this);let n=O(this,Oe).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ut)),n},cf=function(){Ne(this,Ie,pf).call(this);const e=Ur(this.options.staleTime,O(this,Oe));if(js||O(this,Nt).isStale||!rf(e))return;const s=Yx(O(this,Nt).dataUpdatedAt,e)+1;te(this,_s,gs.setTimeout(()=>{O(this,Nt).isStale||this.updateResult()},s))},df=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,Oe)):this.options.refetchInterval)??!1},ff=function(e){Ne(this,Ie,mf).call(this),te(this,Dr,e),!(js||un(this.options.enabled,O(this,Oe))===!1||!rf(O(this,Dr))||O(this,Dr)===0)&&te(this,Cs,gs.setInterval(()=>{(this.options.refetchIntervalInBackground||lh.isFocused())&&Ne(this,Ie,No).call(this)},O(this,Dr)))},hf=function(){Ne(this,Ie,cf).call(this),Ne(this,Ie,ff).call(this,Ne(this,Ie,df).call(this))},pf=function(){O(this,_s)&&(gs.clearTimeout(O(this,_s)),te(this,_s,void 0))},mf=function(){O(this,Cs)&&(gs.clearInterval(O(this,Cs)),te(this,Cs,void 0))},gf=function(){const e=O(this,Ft).getQueryCache().build(O(this,Ft),this.options);if(e===O(this,Oe))return;const n=O(this,Oe);te(this,Oe,e),te(this,ra,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},iw=function(e){vt.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(O(this,Nt))}),O(this,Ft).getQueryCache().notify({query:O(this,Oe),type:"observerResultsUpdated"})})},Q0);function hC(t,e){return un(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Ry(t,e){return hC(t,e)||t.state.data!==void 0&&yf(t,e,e.refetchOnMount)}function yf(t,e,n){if(un(e.enabled,t)!==!1&&Ur(e.staleTime,t)!=="static"){const s=typeof n=="function"?n(t):n;return s==="always"||s!==!1&&uh(t,e)}return!1}function ky(t,e,n,s){return(t!==e||un(s.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&uh(t,n)}function uh(t,e){return un(e.enabled,t)!==!1&&t.isStaleByTime(Ur(e.staleTime,t))}function pC(t,e){return!sf(t.getCurrentResult(),e)}function Ay(t){return{onFetch:(e,n)=>{var g,v,w,T,R;const s=e.options,o=(w=(v=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:w.direction,l=((T=e.state.data)==null?void 0:T.pages)||[],u=((R=e.state.data)==null?void 0:R.pageParams)||[];let d={pages:[],pageParams:[]},f=0;const p=async()=>{let b=!1;const S=P=>{iC(P,()=>e.signal,()=>b=!0)},E=Zx(e.options,e.fetchOptions),k=async(P,A,F)=>{if(b)return Promise.reject();if(A==null&&P.pages.length)return Promise.resolve(P);const q=(()=>{const xe={client:e.client,queryKey:e.queryKey,pageParam:A,direction:F?"backward":"forward",meta:e.options.meta};return S(xe),xe})(),U=await E(q),{maxPages:Y}=e.options,ne=F?sC:rC;return{pages:ne(P.pages,U,Y),pageParams:ne(P.pageParams,A,Y)}};if(o&&l.length){const P=o==="backward",A=P?mC:Ny,F={pages:l,pageParams:u},B=A(s,F);d=await k(F,B,P)}else{const P=t??l.length;do{const A=f===0?u[0]??s.initialPageParam:Ny(s,d);if(f>0&&A==null)break;d=await k(d,A),f++}while(f{var b,S;return(S=(b=e.options).persister)==null?void 0:S.call(b,p,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=p}}}function Ny(t,{pages:e,pageParams:n}){const s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,n[s],n):void 0}function mC(t,{pages:e,pageParams:n}){var s;return e.length>0?(s=t.getPreviousPageParam)==null?void 0:s.call(t,e[0],e,n[0],n):void 0}var ia,On,_t,Ps,jn,Rr,G0,gC=(G0=class extends rw{constructor(e){super();ge(this,jn);ge(this,ia);ge(this,On);ge(this,_t);ge(this,Ps);te(this,ia,e.client),this.mutationId=e.mutationId,te(this,_t,e.mutationCache),te(this,On,[]),this.state=e.state||yC(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){O(this,On).includes(e)||(O(this,On).push(e),this.clearGcTimeout(),O(this,_t).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){te(this,On,O(this,On).filter(n=>n!==e)),this.scheduleGc(),O(this,_t).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){O(this,On).length||(this.state.status==="pending"?this.scheduleGc():O(this,_t).remove(this))}continue(){var e;return((e=O(this,Ps))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var u,d,f,p,g,v,w,T,R,b,S,E,k,P,A,F,B,q;const n=()=>{Ne(this,jn,Rr).call(this,{type:"continue"})},s={client:O(this,ia),meta:this.options.meta,mutationKey:this.options.mutationKey};te(this,Ps,nw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(U,Y)=>{Ne(this,jn,Rr).call(this,{type:"failed",failureCount:U,error:Y})},onPause:()=>{Ne(this,jn,Rr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,_t).canRun(this)}));const o=this.state.status==="pending",l=!O(this,Ps).canStart();try{if(o)n();else{Ne(this,jn,Rr).call(this,{type:"pending",variables:e,isPaused:l}),O(this,_t).config.onMutate&&await O(this,_t).config.onMutate(e,this,s);const Y=await((d=(u=this.options).onMutate)==null?void 0:d.call(u,e,s));Y!==this.state.context&&Ne(this,jn,Rr).call(this,{type:"pending",context:Y,variables:e,isPaused:l})}const U=await O(this,Ps).start();return await((p=(f=O(this,_t).config).onSuccess)==null?void 0:p.call(f,U,e,this.state.context,this,s)),await((v=(g=this.options).onSuccess)==null?void 0:v.call(g,U,e,this.state.context,s)),await((T=(w=O(this,_t).config).onSettled)==null?void 0:T.call(w,U,null,this.state.variables,this.state.context,this,s)),await((b=(R=this.options).onSettled)==null?void 0:b.call(R,U,null,e,this.state.context,s)),Ne(this,jn,Rr).call(this,{type:"success",data:U}),U}catch(U){try{await((E=(S=O(this,_t).config).onError)==null?void 0:E.call(S,U,e,this.state.context,this,s))}catch(Y){Promise.reject(Y)}try{await((P=(k=this.options).onError)==null?void 0:P.call(k,U,e,this.state.context,s))}catch(Y){Promise.reject(Y)}try{await((F=(A=O(this,_t).config).onSettled)==null?void 0:F.call(A,void 0,U,this.state.variables,this.state.context,this,s))}catch(Y){Promise.reject(Y)}try{await((q=(B=this.options).onSettled)==null?void 0:q.call(B,void 0,U,e,this.state.context,s))}catch(Y){Promise.reject(Y)}throw Ne(this,jn,Rr).call(this,{type:"error",error:U}),U}finally{O(this,_t).runNext(this)}}},ia=new WeakMap,On=new WeakMap,_t=new WeakMap,Ps=new WeakMap,jn=new WeakSet,Rr=function(e){const n=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),vt.batch(()=>{O(this,On).forEach(s=>{s.onMutationUpdate(e)}),O(this,_t).notify({mutation:this,type:"updated",action:e})})},G0);function yC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Zn,Tn,oa,X0,vC=(X0=class extends la{constructor(e={}){super();ge(this,Zn);ge(this,Tn);ge(this,oa);this.config=e,te(this,Zn,new Set),te(this,Tn,new Map),te(this,oa,0)}build(e,n,s){const o=new gC({client:e,mutationCache:this,mutationId:++Pl(this,oa)._,options:e.defaultMutationOptions(n),state:s});return this.add(o),o}add(e){O(this,Zn).add(e);const n=jl(e);if(typeof n=="string"){const s=O(this,Tn).get(n);s?s.push(e):O(this,Tn).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(O(this,Zn).delete(e)){const n=jl(e);if(typeof n=="string"){const s=O(this,Tn).get(n);if(s)if(s.length>1){const o=s.indexOf(e);o!==-1&&s.splice(o,1)}else s[0]===e&&O(this,Tn).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=jl(e);if(typeof n=="string"){const s=O(this,Tn).get(n),o=s==null?void 0:s.find(l=>l.state.status==="pending");return!o||o===e}else return!0}runNext(e){var s;const n=jl(e);if(typeof n=="string"){const o=(s=O(this,Tn).get(n))==null?void 0:s.find(l=>l!==e&&l.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){vt.batch(()=>{O(this,Zn).forEach(e=>{this.notify({type:"removed",mutation:e})}),O(this,Zn).clear(),O(this,Tn).clear()})}getAll(){return Array.from(O(this,Zn))}find(e){const n={exact:!0,...e};return this.getAll().find(s=>by(n,s))}findAll(e={}){return this.getAll().filter(n=>by(e,n))}notify(e){vt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return vt.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ut))))}},Zn=new WeakMap,Tn=new WeakMap,oa=new WeakMap,X0);function jl(t){var e;return(e=t.options.scope)==null?void 0:e.id}var Dn,Y0,xC=(Y0=class extends la{constructor(e={}){super();ge(this,Dn);this.config=e,te(this,Dn,new Map)}build(e,n,s){const o=n.queryKey,l=n.queryHash??oh(o,n);let u=this.get(l);return u||(u=new dC({client:e,queryKey:o,queryHash:l,options:e.defaultQueryOptions(n),state:s,defaultOptions:e.getQueryDefaults(o)}),this.add(u)),u}add(e){O(this,Dn).has(e.queryHash)||(O(this,Dn).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=O(this,Dn).get(e.queryHash);n&&(e.destroy(),n===e&&O(this,Dn).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){vt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return O(this,Dn).get(e)}getAll(){return[...O(this,Dn).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(s=>Ey(n,s))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(s=>Ey(e,s)):n}notify(e){vt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){vt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){vt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Dn=new WeakMap,Y0),Ge,Lr,Mr,Ti,_i,Ir,Ci,Pi,J0,wC=(J0=class{constructor(t={}){ge(this,Ge);ge(this,Lr);ge(this,Mr);ge(this,Ti);ge(this,_i);ge(this,Ir);ge(this,Ci);ge(this,Pi);te(this,Ge,t.queryCache||new xC),te(this,Lr,t.mutationCache||new vC),te(this,Mr,t.defaultOptions||{}),te(this,Ti,new Map),te(this,_i,new Map),te(this,Ir,0)}mount(){Pl(this,Ir)._++,O(this,Ir)===1&&(te(this,Ci,lh.subscribe(async t=>{t&&(await this.resumePausedMutations(),O(this,Ge).onFocus())})),te(this,Pi,nu.subscribe(async t=>{t&&(await this.resumePausedMutations(),O(this,Ge).onOnline())})))}unmount(){var t,e;Pl(this,Ir)._--,O(this,Ir)===0&&((t=O(this,Ci))==null||t.call(this),te(this,Ci,void 0),(e=O(this,Pi))==null||e.call(this),te(this,Pi,void 0))}isFetching(t){return O(this,Ge).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return O(this,Lr).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=O(this,Ge).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=O(this,Ge).build(this,e),s=n.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Ur(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return O(this,Ge).findAll(t).map(({queryKey:e,state:n})=>{const s=n.data;return[e,s]})}setQueryData(t,e,n){const s=this.defaultQueryOptions({queryKey:t}),o=O(this,Ge).get(s.queryHash),l=o==null?void 0:o.state.data,u=eC(e,l);if(u!==void 0)return O(this,Ge).build(this,s).setData(u,{...n,manual:!0})}setQueriesData(t,e,n){return vt.batch(()=>O(this,Ge).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=O(this,Ge).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=O(this,Ge);vt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=O(this,Ge);return vt.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},s=vt.batch(()=>O(this,Ge).findAll(t).map(o=>o.cancel(n)));return Promise.all(s).then(Ut).catch(Ut)}invalidateQueries(t,e={}){return vt.batch(()=>(O(this,Ge).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},s=vt.batch(()=>O(this,Ge).findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Ut)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(Ut)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=O(this,Ge).build(this,e);return n.isStaleByTime(Ur(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ut).catch(Ut)}fetchInfiniteQuery(t){return t.behavior=Ay(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ut).catch(Ut)}ensureInfiniteQueryData(t){return t.behavior=Ay(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return nu.isOnline()?O(this,Lr).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Ge)}getMutationCache(){return O(this,Lr)}getDefaultOptions(){return O(this,Mr)}setDefaultOptions(t){te(this,Mr,t)}setQueryDefaults(t,e){O(this,Ti).set(qo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...O(this,Ti).values()],n={};return e.forEach(s=>{Ko(t,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(t,e){O(this,_i).set(qo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...O(this,_i).values()],n={};return e.forEach(s=>{Ko(t,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...O(this,Mr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=oh(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ah&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...O(this,Mr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){O(this,Ge).clear(),O(this,Lr).clear()}},Ge=new WeakMap,Lr=new WeakMap,Mr=new WeakMap,Ti=new WeakMap,_i=new WeakMap,Ir=new WeakMap,Ci=new WeakMap,Pi=new WeakMap,J0),ow=_.createContext(void 0),SC=t=>{const e=_.useContext(ow);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},EC=({client:t,children:e})=>(_.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),y.jsx(ow.Provider,{value:t,children:e})),aw=_.createContext(!1),bC=()=>_.useContext(aw);aw.Provider;function TC(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var _C=_.createContext(TC()),CC=()=>_.useContext(_C),PC=(t,e,n)=>{const s=n!=null&&n.state.error&&typeof t.throwOnError=="function"?ew(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||s)&&(e.isReset()||(t.retryOnMount=!1))},RC=t=>{_.useEffect(()=>{t.clearReset()},[t])},kC=({result:t,errorResetBoundary:e,throwOnError:n,query:s,suspense:o})=>t.isError&&!e.isReset()&&!t.isFetching&&s&&(o&&t.data===void 0||ew(n,[t.error,s])),AC=t=>{if(t.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),s=t.staleTime;t.staleTime=typeof s=="function"?(...o)=>n(s(...o)):n(s),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},NC=(t,e)=>t.isLoading&&t.isFetching&&!e,OC=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,Oy=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function jC(t,e,n){var w,T,R,b;const s=bC(),o=CC(),l=SC(),u=l.defaultQueryOptions(t);(T=(w=l.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||T.call(w,u);const d=l.getQueryCache().get(u.queryHash);u._optimisticResults=s?"isRestoring":"optimistic",AC(u),PC(u,o,d),RC(o);const f=!l.getQueryCache().get(u.queryHash),[p]=_.useState(()=>new e(l,u)),g=p.getOptimisticResult(u),v=!s&&t.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(S=>{const E=v?p.subscribe(vt.batchCalls(S)):Ut;return p.updateResult(),E},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),_.useEffect(()=>{p.setOptions(u)},[u,p]),OC(u,g))throw Oy(u,p,o);if(kC({result:g,errorResetBoundary:o,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw g.error;if((b=(R=l.getDefaultOptions().queries)==null?void 0:R._experimental_afterQuery)==null||b.call(R,u,g),u.experimental_prefetchInRender&&!js&&NC(g,s)){const S=f?Oy(u,p,o):d==null?void 0:d.promise;S==null||S.catch(Ut).finally(()=>{p.updateResult()})}return u.notifyOnChangeProps?g:p.trackResult(g)}function DC(t,e){return jC(t,fC)}const LC=new wC({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Qo(){return Qo=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function ch(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function IC(){return Math.random().toString(36).substr(2,8)}function Dy(t,e){return{usr:t.state,key:t.key,idx:e}}function vf(t,e,n,s){return n===void 0&&(n=null),Qo({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?ji(e):e,{state:n,key:e&&e.key||s||IC()})}function ru(t){let{pathname:e="/",search:n="",hash:s=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function ji(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let s=t.indexOf("?");s>=0&&(e.search=t.substr(s),t=t.substr(0,s)),t&&(e.pathname=t)}return e}function FC(t,e,n,s){s===void 0&&(s={});let{window:o=document.defaultView,v5Compat:l=!1}=s,u=o.history,d=Fr.Pop,f=null,p=g();p==null&&(p=0,u.replaceState(Qo({},u.state,{idx:p}),""));function g(){return(u.state||{idx:null}).idx}function v(){d=Fr.Pop;let S=g(),E=S==null?null:S-p;p=S,f&&f({action:d,location:b.location,delta:E})}function w(S,E){d=Fr.Push;let k=vf(b.location,S,E);p=g()+1;let P=Dy(k,p),A=b.createHref(k);try{u.pushState(P,"",A)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;o.location.assign(A)}l&&f&&f({action:d,location:b.location,delta:1})}function T(S,E){d=Fr.Replace;let k=vf(b.location,S,E);p=g();let P=Dy(k,p),A=b.createHref(k);u.replaceState(P,"",A),l&&f&&f({action:d,location:b.location,delta:0})}function R(S){let E=o.location.origin!=="null"?o.location.origin:o.location.href,k=typeof S=="string"?S:ru(S);return k=k.replace(/ $/,"%20"),et(E,"No window.location.(origin|href) available to create URL for href: "+k),new URL(k,E)}let b={get action(){return d},get location(){return t(o,u)},listen(S){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(jy,v),f=S,()=>{o.removeEventListener(jy,v),f=null}},createHref(S){return e(o,S)},createURL:R,encodeLocation(S){let E=R(S);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:w,replace:T,go(S){return u.go(S)}};return b}var Ly;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Ly||(Ly={}));function UC(t,e,n){return n===void 0&&(n="/"),VC(t,e,n)}function VC(t,e,n,s){let o=typeof e=="string"?ji(e):e,l=dh(o.pathname||"/",n);if(l==null)return null;let u=lw(t);BC(u);let d=null,f=ZC(l);for(let p=0;d==null&&p{let f={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};f.relativePath.startsWith("/")&&(et(f.relativePath.startsWith(s),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(s.length));let p=Vr([s,f.relativePath]),g=n.concat(f);l.children&&l.children.length>0&&(et(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),lw(l.children,e,g,p)),!(l.path==null&&!l.index)&&e.push({path:p,score:QC(p,l.index),routesMeta:g})};return t.forEach((l,u)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))o(l,u);else for(let f of uw(l.path))o(l,u,f)}),e}function uw(t){let e=t.split("/");if(e.length===0)return[];let[n,...s]=e,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(s.length===0)return o?[l,""]:[l];let u=uw(s.join("/")),d=[];return d.push(...u.map(f=>f===""?l:[l,f].join("/"))),o&&d.push(...u),d.map(f=>t.startsWith("/")&&f===""?"/":f)}function BC(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:GC(e.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const zC=/^:[\w-]+$/,$C=3,WC=2,HC=1,qC=10,KC=-2,My=t=>t==="*";function QC(t,e){let n=t.split("/"),s=n.length;return n.some(My)&&(s+=KC),e&&(s+=WC),n.filter(o=>!My(o)).reduce((o,l)=>o+(zC.test(l)?$C:l===""?HC:qC),s)}function GC(t,e){return t.length===e.length&&t.slice(0,-1).every((s,o)=>s===e[o])?t[t.length-1]-e[e.length-1]:0}function XC(t,e,n){let{routesMeta:s}=t,o={},l="/",u=[];for(let d=0;d{let{paramName:w,isOptional:T}=g;if(w==="*"){let b=d[v]||"";u=l.slice(0,l.length-b.length).replace(/(.)\/+$/,"$1")}const R=d[v];return T&&!R?p[w]=void 0:p[w]=(R||"").replace(/%2F/g,"/"),p},{}),pathname:l,pathnameBase:u,pattern:t}}function JC(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),ch(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let s=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,f)=>(s.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(s.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),s]}function ZC(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return ch(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function dh(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,s=t.charAt(n);return s&&s!=="/"?null:t.slice(n)||"/"}const eP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tP=t=>eP.test(t);function nP(t,e){e===void 0&&(e="/");let{pathname:n,search:s="",hash:o=""}=typeof t=="string"?ji(t):t,l;if(n)if(tP(n))l=n;else{if(n.includes("//")){let u=n;n=cw(n),ch(!1,"Pathnames cannot have embedded double slashes - normalizing "+(u+" -> "+n))}n.startsWith("/")?l=Iy(n.substring(1),"/"):l=Iy(n,e)}else l=e;return{pathname:l,search:iP(s),hash:oP(o)}}function Iy(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function _d(t,e,n,s){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function rP(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function fh(t,e){let n=rP(t);return e?n.map((s,o)=>o===n.length-1?s.pathname:s.pathnameBase):n.map(s=>s.pathnameBase)}function hh(t,e,n,s){s===void 0&&(s=!1);let o;typeof t=="string"?o=ji(t):(o=Qo({},t),et(!o.pathname||!o.pathname.includes("?"),_d("?","pathname","search",o)),et(!o.pathname||!o.pathname.includes("#"),_d("#","pathname","hash",o)),et(!o.search||!o.search.includes("#"),_d("#","search","hash",o)));let l=t===""||o.pathname==="",u=l?"/":o.pathname,d;if(u==null)d=n;else{let v=e.length-1;if(!s&&u.startsWith("..")){let w=u.split("/");for(;w[0]==="..";)w.shift(),v-=1;o.pathname=w.join("/")}d=v>=0?e[v]:"/"}let f=nP(o,d),p=u&&u!=="/"&&u.endsWith("/"),g=(l||u===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(p||g)&&(f.pathname+="/"),f}const cw=t=>t.replace(/\/\/+/g,"/"),Vr=t=>cw(t.join("/")),sP=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),iP=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,oP=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function aP(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const dw=["post","put","patch","delete"];new Set(dw);const lP=["get",...dw];new Set(lP);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Go(){return Go=Object.assign?Object.assign.bind():function(t){for(var e=1;e{d.current=!0}),_.useCallback(function(p,g){if(g===void 0&&(g={}),!d.current)return;if(typeof p=="number"){s.go(p);return}let v=hh(p,JSON.parse(u),l,g.relative==="path");t==null&&e!=="/"&&(v.pathname=v.pathname==="/"?e:Vr([e,v.pathname])),(g.replace?s.replace:s.push)(v,g.state,g)},[e,s,u,l,t])}function pw(t,e){let{relative:n}=e===void 0?{}:e,{future:s}=_.useContext(qr),{matches:o}=_.useContext(Kr),{pathname:l}=Qr(),u=JSON.stringify(fh(o,s.v7_relativeSplatPath));return _.useMemo(()=>hh(t,JSON.parse(u),l,n==="path"),[t,u,l,n])}function hP(t,e){return pP(t,e)}function pP(t,e,n,s){Di()||et(!1);let{navigator:o}=_.useContext(qr),{matches:l}=_.useContext(Kr),u=l[l.length-1],d=u?u.params:{};u&&u.pathname;let f=u?u.pathnameBase:"/";u&&u.route;let p=Qr(),g;if(e){var v;let S=typeof e=="string"?ji(e):e;f==="/"||(v=S.pathname)!=null&&v.startsWith(f)||et(!1),g=S}else g=p;let w=g.pathname||"/",T=w;if(f!=="/"){let S=f.replace(/^\//,"").split("/");T="/"+w.replace(/^\//,"").split("/").slice(S.length).join("/")}let R=UC(t,{pathname:T}),b=xP(R&&R.map(S=>Object.assign({},S,{params:Object.assign({},d,S.params),pathname:Vr([f,o.encodeLocation?o.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?f:Vr([f,o.encodeLocation?o.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),l,n,s);return e&&b?_.createElement(ua.Provider,{value:{location:Go({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:Fr.Pop}},b):b}function mP(){let t=bP(),e=aP(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},e),n?_.createElement("pre",{style:o},n):null,null)}const gP=_.createElement(mP,null);class yP extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?_.createElement(Kr.Provider,{value:this.props.routeContext},_.createElement(fw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function vP(t){let{routeContext:e,match:n,children:s}=t,o=_.useContext(ph);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),_.createElement(Kr.Provider,{value:e},s)}function xP(t,e,n,s){var o;if(e===void 0&&(e=[]),n===void 0&&(n=null),s===void 0&&(s=null),t==null){var l;if(!n)return null;if(n.errors)t=n.matches;else if((l=s)!=null&&l.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let u=t,d=(o=n)==null?void 0:o.errors;if(d!=null){let g=u.findIndex(v=>v.route.id&&(d==null?void 0:d[v.route.id])!==void 0);g>=0||et(!1),u=u.slice(0,Math.min(u.length,g+1))}let f=!1,p=-1;if(n&&s&&s.v7_partialHydration)for(let g=0;g=0?u=u.slice(0,p+1):u=[u[0]];break}}}return u.reduceRight((g,v,w)=>{let T,R=!1,b=null,S=null;n&&(T=d&&v.route.id?d[v.route.id]:void 0,b=v.route.errorElement||gP,f&&(p<0&&w===0?(_P("route-fallback"),R=!0,S=null):p===w&&(R=!0,S=v.route.hydrateFallbackElement||null)));let E=e.concat(u.slice(0,w+1)),k=()=>{let P;return T?P=b:R?P=S:v.route.Component?P=_.createElement(v.route.Component,null):v.route.element?P=v.route.element:P=g,_.createElement(vP,{match:v,routeContext:{outlet:g,matches:E,isDataRoute:n!=null},children:P})};return n&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?_.createElement(yP,{location:n.location,revalidation:n.revalidation,component:b,error:T,children:k(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):k()},null)}var mw=(function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t})(mw||{}),gw=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(gw||{});function wP(t){let e=_.useContext(ph);return e||et(!1),e}function SP(t){let e=_.useContext(uP);return e||et(!1),e}function EP(t){let e=_.useContext(Kr);return e||et(!1),e}function yw(t){let e=EP(),n=e.matches[e.matches.length-1];return n.route.id||et(!1),n.route.id}function bP(){var t;let e=_.useContext(fw),n=SP(),s=yw();return e!==void 0?e:(t=n.errors)==null?void 0:t[s]}function TP(){let{router:t}=wP(mw.UseNavigateStable),e=yw(gw.UseNavigateStable),n=_.useRef(!1);return hw(()=>{n.current=!0}),_.useCallback(function(o,l){l===void 0&&(l={}),n.current&&(typeof o=="number"?t.navigate(o):t.navigate(o,Go({fromRouteId:e},l)))},[t,e])}const Fy={};function _P(t,e,n){Fy[t]||(Fy[t]=!0)}function CP(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function PP(t){let{to:e,replace:n,state:s,relative:o}=t;Di()||et(!1);let{future:l,static:u}=_.useContext(qr),{matches:d}=_.useContext(Kr),{pathname:f}=Qr(),p=mh(),g=hh(e,fh(d,l.v7_relativeSplatPath),f,o==="path"),v=JSON.stringify(g);return _.useEffect(()=>p(JSON.parse(v),{replace:n,state:s,relative:o}),[p,v,o,n,s]),null}function Wl(t){et(!1)}function RP(t){let{basename:e="/",children:n=null,location:s,navigationType:o=Fr.Pop,navigator:l,static:u=!1,future:d}=t;Di()&&et(!1);let f=e.replace(/^\/*/,"/"),p=_.useMemo(()=>({basename:f,navigator:l,static:u,future:Go({v7_relativeSplatPath:!1},d)}),[f,d,l,u]);typeof s=="string"&&(s=ji(s));let{pathname:g="/",search:v="",hash:w="",state:T=null,key:R="default"}=s,b=_.useMemo(()=>{let S=dh(g,f);return S==null?null:{location:{pathname:S,search:v,hash:w,state:T,key:R},navigationType:o}},[f,g,v,w,T,R,o]);return b==null?null:_.createElement(qr.Provider,{value:p},_.createElement(ua.Provider,{children:n,value:b}))}function kP(t){let{children:e,location:n}=t;return hP(xf(e),n)}new Promise(()=>{});function xf(t,e){e===void 0&&(e=[]);let n=[];return _.Children.forEach(t,(s,o)=>{if(!_.isValidElement(s))return;let l=[...e,o];if(s.type===_.Fragment){n.push.apply(n,xf(s.props.children,l));return}s.type!==Wl&&et(!1),!s.props.index||!s.props.children||et(!1);let u={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(u.children=xf(s.props.children,l)),n.push(u)}),n}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function wf(){return wf=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let s=t[n];return e.concat(Array.isArray(s)?s.map(o=>[n,o]):[[n,s]])},[]))}function jP(t,e){let n=Sf(t);return e&&e.forEach((s,o)=>{n.has(o)||e.getAll(o).forEach(l=>{n.append(o,l)})}),n}const DP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],LP="6";try{window.__reactRouterVersion=LP}catch{}const MP="startTransition",Uy=ex[MP];function IP(t){let{basename:e,children:n,future:s,window:o}=t,l=_.useRef();l.current==null&&(l.current=MC({window:o,v5Compat:!0}));let u=l.current,[d,f]=_.useState({action:u.action,location:u.location}),{v7_startTransition:p}=s||{},g=_.useCallback(v=>{p&&Uy?Uy(()=>f(v)):f(v)},[f,p]);return _.useLayoutEffect(()=>u.listen(g),[u,g]),_.useEffect(()=>CP(s),[s]),_.createElement(RP,{basename:e,children:n,location:d.location,navigationType:d.action,navigator:u,future:s})}const FP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",UP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dn=_.forwardRef(function(e,n){let{onClick:s,relative:o,reloadDocument:l,replace:u,state:d,target:f,to:p,preventScrollReset:g,viewTransition:v}=e,w=AP(e,DP),{basename:T}=_.useContext(qr),R,b=!1;if(typeof p=="string"&&UP.test(p)&&(R=p,FP))try{let P=new URL(window.location.href),A=p.startsWith("//")?new URL(P.protocol+p):new URL(p),F=dh(A.pathname,T);A.origin===P.origin&&F!=null?p=F+A.search+A.hash:b=!0}catch{}let S=cP(p,{relative:o}),E=VP(p,{replace:u,state:d,target:f,preventScrollReset:g,relative:o,viewTransition:v});function k(P){s&&s(P),P.defaultPrevented||E(P)}return _.createElement("a",wf({},w,{href:R||S,onClick:b||l?s:k,ref:n,target:f}))});var Vy;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Vy||(Vy={}));var By;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(By||(By={}));function VP(t,e){let{target:n,replace:s,state:o,preventScrollReset:l,relative:u,viewTransition:d}=e===void 0?{}:e,f=mh(),p=Qr(),g=pw(t,{relative:u});return _.useCallback(v=>{if(OP(v,n)){v.preventDefault();let w=s!==void 0?s:ru(p)===ru(g);f(t,{replace:w,state:o,preventScrollReset:l,relative:u,viewTransition:d})}},[p,f,g,s,o,n,t,l,u,d])}function BP(t){let e=_.useRef(Sf(t)),n=_.useRef(!1),s=Qr(),o=_.useMemo(()=>jP(s.search,n.current?null:e.current),[s.search]),l=mh(),u=_.useCallback((d,f)=>{const p=Sf(typeof d=="function"?d(o):d);n.current=!0,l("?"+p,f)},[l,o]);return[o,u]}function vw(t,e){return function(){return t.apply(e,arguments)}}const{toString:zP}=Object.prototype,{getPrototypeOf:Ri}=Object,{iterator:ca,toStringTag:xw}=Symbol,su=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Xo=(t,e)=>{let n=t;const s=[];for(;n!=null&&n!==Object.prototype;){if(s.indexOf(n)!==-1)return!1;if(s.push(n),su(n,e))return!0;n=Ri(n)}return!1},$P=(t,e)=>t!=null&&Xo(t,e)?t[e]:void 0,gh=(t=>e=>{const n=zP.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Cn=t=>(t=t.toLowerCase(),e=>gh(e)===t),gu=t=>e=>typeof e===t,{isArray:Ds}=Array,ki=gu("undefined");function Li(t){return t!==null&&!ki(t)&&t.constructor!==null&&!ki(t.constructor)&&Vt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ww=Cn("ArrayBuffer");function WP(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ww(t.buffer),e}const HP=gu("string"),Vt=gu("function"),Sw=gu("number"),Mi=t=>t!==null&&typeof t=="object",qP=t=>t===!0||t===!1,Hl=t=>{if(!Mi(t))return!1;const e=Ri(t);return(e===null||e===Object.prototype||Ri(e)===null)&&!Xo(t,xw)&&!Xo(t,ca)},KP=t=>{if(!Mi(t)||Li(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},QP=Cn("Date"),GP=Cn("File"),XP=t=>!!(t&&typeof t.uri<"u"),YP=t=>t&&typeof t.getParts<"u",JP=Cn("Blob"),ZP=Cn("FileList"),eR=t=>Mi(t)&&Vt(t.pipe);function tR(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const zy=tR(),$y=typeof zy.FormData<"u"?zy.FormData:void 0,nR=t=>{if(!t)return!1;if($y&&t instanceof $y)return!0;const e=Ri(t);if(!e||e===Object.prototype||!Vt(t.append))return!1;const n=gh(t);return n==="formdata"||n==="object"&&Vt(t.toString)&&t.toString()==="[object FormData]"},rR=Cn("URLSearchParams"),[sR,iR,oR,aR]=["ReadableStream","Request","Response","Headers"].map(Cn),lR=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function da(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,o;if(typeof t!="object"&&(t=[t]),Ds(t))for(s=0,o=t.length;s0;)if(o=n[s],e===o.toLowerCase())return o;return null}const ys=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,bw=t=>!ki(t)&&t!==ys;function Ef(...t){const{caseless:e,skipUndefined:n}=bw(this)&&this||{},s={},o=(l,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const d=e&&typeof u=="string"&&Ew(s,u)||u,f=su(s,d)?s[d]:void 0;Hl(f)&&Hl(l)?s[d]=Ef(f,l):Hl(l)?s[d]=Ef({},l):Ds(l)?s[d]=l.slice():(!n||!ki(l))&&(s[d]=l)};for(let l=0,u=t.length;l(da(e,(o,l)=>{n&&Vt(o)?Object.defineProperty(t,l,{__proto__:null,value:vw(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,l,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),t),cR=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),dR=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),n&&Object.assign(t.prototype,n)},fR=(t,e,n,s)=>{let o,l,u;const d={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),l=o.length;l-- >0;)u=o[l],(!s||s(u,t,e))&&!d[u]&&(e[u]=t[u],d[u]=!0);t=n!==!1&&Ri(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},hR=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},pR=t=>{if(!t)return null;if(Ds(t))return t;let e=t.length;if(!Sw(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},mR=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ri(Uint8Array)),gR=(t,e)=>{const s=(t&&t[ca]).call(t);let o;for(;(o=s.next())&&!o.done;){const l=o.value;e.call(t,l[0],l[1])}},yR=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},vR=Cn("HTMLFormElement"),xR=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,o){return s.toUpperCase()+o}),{propertyIsEnumerable:wR}=Object.prototype,SR=Cn("RegExp"),Tw=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};da(n,(o,l)=>{let u;(u=e(o,l,t))!==!1&&(s[l]=u||o)}),Object.defineProperties(t,s)},ER=t=>{Tw(t,(e,n)=>{if(Vt(t)&&["arguments","caller","callee"].includes(n))return!1;const s=t[n];if(Vt(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},bR=(t,e)=>{const n={},s=o=>{o.forEach(l=>{n[l]=!0})};return Ds(t)?s(t):s(String(t).split(e)),n},TR=()=>{},_R=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function CR(t){return!!(t&&Vt(t.append)&&t[xw]==="FormData"&&t[ca])}const PR=t=>{const e=new WeakSet,n=s=>{if(Mi(s)){if(e.has(s))return;if(Li(s))return s;if(!("toJSON"in s)){e.add(s);const o=Ds(s)?[]:{};return da(s,(l,u)=>{const d=n(l);!ki(d)&&(o[u]=d)}),e.delete(s),o}}return s};return n(t)},RR=Cn("AsyncFunction"),kR=t=>t&&(Mi(t)||Vt(t))&&Vt(t.then)&&Vt(t.catch),_w=((t,e)=>t?setImmediate:e?((n,s)=>(ys.addEventListener("message",({source:o,data:l})=>{o===ys&&l===n&&s.length&&s.shift()()},!1),o=>{s.push(o),ys.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Vt(ys.postMessage)),AR=typeof queueMicrotask<"u"?queueMicrotask.bind(ys):typeof process<"u"&&process.nextTick||_w,Cw=t=>t!=null&&Vt(t[ca]),NR=t=>t!=null&&Xo(t,ca)&&Cw(t),L={isArray:Ds,isArrayBuffer:ww,isBuffer:Li,isFormData:nR,isArrayBufferView:WP,isString:HP,isNumber:Sw,isBoolean:qP,isObject:Mi,isPlainObject:Hl,isEmptyObject:KP,isReadableStream:sR,isRequest:iR,isResponse:oR,isHeaders:aR,isUndefined:ki,isDate:QP,isFile:GP,isReactNativeBlob:XP,isReactNative:YP,isBlob:JP,isRegExp:SR,isFunction:Vt,isStream:eR,isURLSearchParams:rR,isTypedArray:mR,isFileList:ZP,forEach:da,merge:Ef,extend:uR,trim:lR,stripBOM:cR,inherits:dR,toFlatObject:fR,kindOf:gh,kindOfTest:Cn,endsWith:hR,toArray:pR,forEachEntry:gR,matchAll:yR,isHTMLForm:vR,hasOwnProperty:su,hasOwnProp:su,hasOwnInPrototypeChain:Xo,getSafeProp:$P,reduceDescriptors:Tw,freezeMethods:ER,toObjectSet:bR,toCamelCase:xR,noop:TR,toFiniteNumber:_R,findKey:Ew,global:ys,isContextDefined:bw,isSpecCompliantForm:CR,toJSONObject:PR,isAsyncFn:RR,isThenable:kR,setImmediate:_w,asap:AR,isIterable:Cw,isSafeIterable:NR},OR=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jR=t=>{const e={};let n,s,o;return t&&t.split(` `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),s=u.substring(o+1).trim(),!(!n||e[n]&&OR[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e};function DR(t){let e=0,n=t.length;for(;ee;){const s=t.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}const LR=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),MR=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function yh(t,e){return L.isArray(t)?t.map(n=>yh(n,e)):DR(String(t).replace(e,""))}const IR=t=>yh(t,LR),FR=t=>yh(t,MR);function Pw(t){const e=Object.create(null);return L.forEach(t.toJSON(),(n,s)=>{e[s]=FR(n)}),e}const Wy=Symbol("internals");function Po(t){return t&&String(t).trim().toLowerCase()}function ql(t){return t===!1||t==null?t:L.isArray(t)?t.map(ql):IR(String(t))}function UR(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const VR=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Cd(t,e,n,s,o){if(L.isFunction(s))return s.call(this,e,n);if(o&&(e=n),!!L.isString(e)){if(L.isString(s))return e.indexOf(s)!==-1;if(L.isRegExp(s))return s.test(e)}}function BR(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function zR(t,e){const n=L.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{__proto__:null,value:function(o,l,u){return this[s].call(this,e,o,l,u)},configurable:!0})})}let Rt=class{constructor(e){e&&this.set(e)}set(e,n,s){const o=this;function l(d,f,p){const g=Po(f);if(!g)return;const v=L.findKey(o,g);(!v||o[v]===void 0||p===!0||p===void 0&&o[v]!==!1)&&(o[v||f]=ql(d))}const u=(d,f)=>L.forEach(d,(p,g)=>l(p,g,f));if(L.isPlainObject(e)||e instanceof this.constructor)u(e,n);else if(L.isString(e)&&(e=e.trim())&&!VR(e))u(jR(e),n);else if(L.isObject(e)&&L.isSafeIterable(e)){let d=Object.create(null),f,p;for(const g of e){if(!L.isArray(g))throw new TypeError("Object iterator must return a key-value pair");p=g[0],L.hasOwnProp(d,p)?(f=d[p],d[p]=L.isArray(f)?[...f,g[1]]:[f,g[1]]):d[p]=g[1]}u(d,n)}else e!=null&&l(n,e,s);return this}get(e,n){if(e=Po(e),e){const s=L.findKey(this,e);if(s){const o=this[s];if(!n)return o;if(n===!0)return UR(o);if(L.isFunction(n))return n.call(this,o,s);if(L.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Po(e),e){const s=L.findKey(this,e);return!!(s&&this[s]!==void 0&&(!n||Cd(this,this[s],s,n)))}return!1}delete(e,n){const s=this;let o=!1;function l(u){if(u=Po(u),u){const d=L.findKey(s,u);d&&(!n||Cd(s,s[d],d,n))&&(delete s[d],o=!0)}}return L.isArray(e)?e.forEach(l):l(e),o}clear(e){const n=Object.keys(this);let s=n.length,o=!1;for(;s--;){const l=n[s];(!e||Cd(this,this[l],l,e,!0))&&(delete this[l],o=!0)}return o}normalize(e){const n=this,s={};return L.forEach(this,(o,l)=>{const u=L.findKey(s,l);if(u){n[u]=ql(o),delete n[l];return}const d=e?BR(l):String(l).trim();d!==l&&delete n[l],n[d]=ql(o),s[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return L.forEach(this,(s,o)=>{s!=null&&s!==!1&&(n[o]=e&&L.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(o=>s.set(o)),s}static accessor(e){const s=(this[Wy]=this[Wy]={accessors:{}}).accessors,o=this.prototype;function l(u){const d=Po(u);s[d]||(zR(o,u),s[d]=!0)}return L.isArray(e)?e.forEach(l):l(e),this}};Rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(Rt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[n]=s}}});L.freezeMethods(Rt);const $R="[REDACTED ****]";function WR(t){if(L.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(L.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function HR(t,e){const n=new Set(e.map(l=>String(l).toLowerCase())),s=[],o=l=>{if(l===null||typeof l!="object"||L.isBuffer(l))return l;if(s.indexOf(l)!==-1)return;l instanceof Rt&&(l=l.toJSON()),s.push(l);let u;if(L.isArray(l))u=[],l.forEach((d,f)=>{const p=o(d);L.isUndefined(p)||(u[f]=p)});else{if(!L.isPlainObject(l)&&WR(l))return s.pop(),l;u=Object.create(null);for(const[d,f]of Object.entries(l)){const p=n.has(d.toLowerCase())?$R:o(f);L.isUndefined(p)||(u[d]=p)}}return s.pop(),u};return o(t)}let J=class Rw extends Error{static from(e,n,s,o,l,u){const d=new Rw(e.message,n||e.code,s,o,l);return Object.defineProperty(d,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),d.name=e.name,e.status!=null&&d.status==null&&(d.status=e.status),u&&Object.assign(d,u),d}constructor(e,n,s,o,l){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),o&&(this.request=o),l&&(this.response=l,this.status=l.status)}toJSON(){const e=this.config,n=e&&L.hasOwnProp(e,"redact")?e.redact:void 0,s=L.isArray(n)&&n.length>0?HR(e,n):L.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};J.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";J.ERR_BAD_OPTION="ERR_BAD_OPTION";J.ECONNABORTED="ECONNABORTED";J.ETIMEDOUT="ETIMEDOUT";J.ECONNREFUSED="ECONNREFUSED";J.ERR_NETWORK="ERR_NETWORK";J.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";J.ERR_DEPRECATED="ERR_DEPRECATED";J.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";J.ERR_BAD_REQUEST="ERR_BAD_REQUEST";J.ERR_CANCELED="ERR_CANCELED";J.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";J.ERR_INVALID_URL="ERR_INVALID_URL";J.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const qR=null,kw=100;function bf(t){return L.isPlainObject(t)||L.isArray(t)}function Aw(t){return L.endsWith(t,"[]")?t.slice(0,-2):t}function Pd(t,e,n){return t?t.concat(e).map(function(o,l){return o=Aw(o),!n&&l?"["+o+"]":o}).join(n?".":""):e}function KR(t){return L.isArray(t)&&!t.some(bf)}const QR=L.toFlatObject(L,{},null,function(e){return/^is[A-Z]/.test(e)});function yu(t,e,n){if(!L.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,P){return!L.isUndefined(P[k])});const s=n.metaTokens,o=n.visitor||R,l=n.dots,u=n.indexes,d=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?kw:n.maxDepth,p=d&&L.isSpecCompliantForm(e),g=[];if(!L.isFunction(o))throw new TypeError("visitor must be a function");function v(E){if(E===null)return"";if(L.isDate(E))return E.toISOString();if(L.isBoolean(E))return E.toString();if(!p&&L.isBlob(E))throw new J("Blob is not supported. Use a Buffer instead.");if(L.isArrayBuffer(E)||L.isTypedArray(E)){if(p&&typeof d=="function")return new d([E]);if(typeof Buffer<"u")return Buffer.from(E);throw new J("Blob is not supported. Use a Buffer instead.",J.ERR_NOT_SUPPORT)}return E}function w(E){if(E>f)throw new J("Object is too deeply nested ("+E+" levels). Max depth: "+f,J.ERR_FORM_DATA_DEPTH_EXCEEDED)}function T(E,k){if(f===1/0)return JSON.stringify(E);const P=[];return JSON.stringify(E,function(F,B){if(!L.isObject(B))return B;for(;P.length&&P[P.length-1]!==this;)P.pop();return P.push(B),w(k+P.length-1),B})}function R(E,k,P){let A=E;if(L.isReactNative(e)&&L.isReactNativeBlob(E))return e.append(Pd(P,k,l),v(E)),!1;if(E&&!P&&typeof E=="object"){if(L.endsWith(k,"{}"))k=s?k:k.slice(0,-2),E=T(E,1);else if(L.isArray(E)&&KR(E)||(L.isFileList(E)||L.endsWith(k,"[]"))&&(A=L.toArray(E)))return k=Aw(k),A.forEach(function(B,q){!(L.isUndefined(B)||B===null)&&e.append(u===!0?Pd([k],q,l):u===null?k:k+"[]",v(B))}),!1}return bf(E)?!0:(e.append(Pd(P,k,l),v(E)),!1)}const b=Object.assign(QR,{defaultVisitor:R,convertValue:v,isVisitable:bf});function S(E,k,P=0){if(!L.isUndefined(E)){if(w(P),g.indexOf(E)!==-1)throw new Error("Circular reference detected in "+k.join("."));g.push(E),L.forEach(E,function(F,B){(!(L.isUndefined(F)||F===null)&&o.call(e,F,L.isString(B)?B.trim():B,k,b))===!0&&S(F,k?k.concat(B):[B],P+1)}),g.pop()}}if(!L.isObject(t))throw new TypeError("data must be an object");return S(t),e}function Hy(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(s){return e[s]})}function vh(t,e){this._pairs=[],t&&yu(t,this,e)}const Nw=vh.prototype;Nw.append=function(e,n){this._pairs.push([e,n])};Nw.toString=function(e){const n=e?s=>e.call(this,s,Hy):Hy;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function GR(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ow(t,e,n){if(!e)return t;t=t||"";const s=L.isFunction(n)?{serialize:n}:n,o=L.getSafeProp(s,"encode")||GR,l=L.getSafeProp(s,"serialize");let u;if(l?u=l(e,s):u=L.isURLSearchParams(e)?e.toString():new vh(e,s).toString(o),u){const d=t.indexOf("#");d!==-1&&(t=t.slice(0,d)),t+=(t.indexOf("?")===-1?"?":"&")+u}return t}class qy{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){L.forEach(this.handlers,function(s){s!==null&&e(s)})}}const xh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},XR=typeof URLSearchParams<"u"?URLSearchParams:vh,YR=typeof FormData<"u"?FormData:null,JR=typeof Blob<"u"?Blob:null,ZR={isBrowser:!0,classes:{URLSearchParams:XR,FormData:YR,Blob:JR},protocols:["http","https","file","blob","url","data"]},wh=typeof window<"u"&&typeof document<"u",Tf=typeof navigator=="object"&&navigator||void 0,ek=wh&&(!Tf||["ReactNative","NativeScript","NS"].indexOf(Tf.product)<0),tk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nk=wh&&window.location.href||"http://localhost",rk=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wh,hasStandardBrowserEnv:ek,hasStandardBrowserWebWorkerEnv:tk,navigator:Tf,origin:nk},Symbol.toStringTag,{value:"Module"})),xt={...rk,...ZR};function sk(t,e){return yu(t,new xt.classes.URLSearchParams,{visitor:function(n,s,o,l){return xt.isNode&&L.isBuffer(n)?(this.append(s,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...e})}const Ky=kw;function jw(t){if(t>Ky)throw new J("FormData field is too deeply nested ("+t+" levels). Max depth: "+Ky,J.ERR_FORM_DATA_DEPTH_EXCEEDED)}function ik(t){const e=[],n=/\w+|\[(\w*)]/g;let s;for(;(s=n.exec(t))!==null;)jw(e.length),e.push(s[0]==="[]"?"":s[1]||s[0]);return e}function ok(t){const e={},n=Object.keys(t);let s;const o=n.length;let l;for(s=0;s=n.length;return u=!u&&L.isArray(o)?o.length:u,f?(L.hasOwnProp(o,u)?o[u]=L.isArray(o[u])?o[u].concat(s):[o[u],s]:o[u]=s,!d):((!L.hasOwnProp(o,u)||!L.isObject(o[u]))&&(o[u]=[]),e(n,s,o[u],l)&&L.isArray(o[u])&&(o[u]=ok(o[u])),!d)}if(L.isFormData(t)&&L.isFunction(t.entries)){const n={};return L.forEachEntry(t,(s,o)=>{e(ik(s),o,n,0)}),n}return null}const ui=(t,e)=>t!=null&&L.hasOwnProp(t,e)?t[e]:void 0;function ak(t,e,n){if(L.isString(t))try{return(e||JSON.parse)(t),L.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const fa={transitional:xh,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const s=n.getContentType()||"",o=s.indexOf("application/json")>-1,l=L.isObject(e);if(l&&L.isHTMLForm(e)&&(e=new FormData(e)),L.isFormData(e))return o?JSON.stringify(Dw(e)):e;if(L.isArrayBuffer(e)||L.isBuffer(e)||L.isStream(e)||L.isFile(e)||L.isBlob(e)||L.isReadableStream(e))return e;if(L.isArrayBufferView(e))return e.buffer;if(L.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(l){const f=ui(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return sk(e,f).toString();if((d=L.isFileList(e))||s.indexOf("multipart/form-data")>-1){const p=ui(this,"env"),g=p&&p.FormData;return yu(d?{"files[]":e}:e,g&&new g,f)}}return l||o?(n.setContentType("application/json",!1),ak(e)):e}],transformResponse:[function(e){const n=ui(this,"transitional")||fa.transitional,s=n&&n.forcedJSONParsing,o=ui(this,"responseType"),l=o==="json";if(L.isResponse(e)||L.isReadableStream(e))return e;if(e&&L.isString(e)&&(s&&!o||l)){const d=!(n&&n.silentJSONParsing)&&l;try{return JSON.parse(e,ui(this,"parseReviver"))}catch(f){if(d)throw f.name==="SyntaxError"?J.from(f,J.ERR_BAD_RESPONSE,this,null,ui(this,"response")):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch","query"],t=>{fa.headers[t]={}});function Rd(t,e){const n=this||fa,s=e||n,o=Rt.from(s.headers);let l=s.data;return L.forEach(t,function(d){l=d.call(n,l,o.normalize(),e?e.status:void 0)}),o.normalize(),l}function Lw(t){return!!(t&&t.__CANCEL__)}let ha=class extends J{constructor(e,n,s){super(e??"canceled",J.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function Mw(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new J("Request failed with status code "+n.status,n.status>=400&&n.status<500?J.ERR_BAD_REQUEST:J.ERR_BAD_RESPONSE,n.config,n.request,n))}function lk(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function uk(t,e){t=t||10;const n=new Array(t),s=new Array(t);let o=0,l=0,u;return e=e!==void 0?e:1e3,function(f){const p=Date.now(),g=s[l];u||(u=p),n[o]=f,s[o]=p;let v=l,w=0;for(;v!==o;)w+=n[v++],v=v%t;if(o=(o+1)%t,o===l&&(l=(l+1)%t),p-u{n=g,o=null,l&&(clearTimeout(l),l=null),t(...p)};return[(...p)=>{const g=Date.now(),v=g-n;v>=s?u(p,g):(o=p,l||(l=setTimeout(()=>{l=null,u(o)},s-v)))},()=>o&&u(o)]}const iu=(t,e,n=3)=>{let s=0;const o=uk(50,250);return ck(l=>{if(!l||typeof l.loaded!="number")return;const u=l.loaded,d=l.lengthComputable?l.total:void 0,f=d!=null?Math.min(u,d):u,p=Math.max(0,f-s),g=o(p);s=Math.max(s,f);const v={loaded:f,total:d,progress:d?f/d:void 0,bytes:p,rate:g||void 0,estimated:g&&d?(d-f)/g:void 0,event:l,lengthComputable:d!=null,[e?"download":"upload"]:!0};t(v)},n)},Qy=(t,e)=>{const n=t!=null;return[s=>e[0]({lengthComputable:n,total:t,loaded:s}),e[1]]},Gy=t=>(...e)=>L.asap(()=>t(...e)),dk=xt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,xt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,fk=xt.hasStandardBrowserEnv?{write(t,e,n,s,o,l,u){if(typeof document>"u")return;const d=[`${t}=${encodeURIComponent(e)}`];L.isNumber(n)&&d.push(`expires=${new Date(n).toUTCString()}`),L.isString(s)&&d.push(`path=${s}`),L.isString(o)&&d.push(`domain=${o}`),l===!0&&d.push("secure"),L.isString(u)&&d.push(`SameSite=${u}`),document.cookie=d.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let n=0;nt instanceof Rt?{...t}:t;function Ls(t,e){t=t||{},e=e||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(g,v,w,T){return L.isPlainObject(g)&&L.isPlainObject(v)?L.merge.call({caseless:T},g,v):L.isPlainObject(v)?L.merge({},v):L.isArray(v)?v.slice():v}function o(g,v,w,T){if(L.isUndefined(v)){if(!L.isUndefined(g))return s(void 0,g,w,T)}else return s(g,v,w,T)}function l(g,v){if(!L.isUndefined(v))return s(void 0,v)}function u(g,v){if(L.isUndefined(v)){if(!L.isUndefined(g))return s(void 0,g)}else return s(void 0,v)}function d(g){const v=L.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!L.isUndefined(v))if(L.isPlainObject(v)){if(L.hasOwnProp(v,g))return v[g]}else return;const w=L.hasOwnProp(t,"transitional")?t.transitional:void 0;if(L.isPlainObject(w)&&L.hasOwnProp(w,g))return w[g]}function f(g,v,w){if(L.hasOwnProp(e,w))return s(g,v);if(L.hasOwnProp(t,w))return s(void 0,g)}const p={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:f,headers:(g,v,w)=>o(Yy(g),Yy(v),w,!0)};return L.forEach(Object.keys({...t,...e}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const w=L.hasOwnProp(p,v)?p[v]:o,T=L.hasOwnProp(t,v)?t[v]:void 0,R=L.hasOwnProp(e,v)?e[v]:void 0,b=w(T,R,v);L.isUndefined(b)&&w!==f||(n[v]=b)}),L.hasOwnProp(e,"validateStatus")&&L.isUndefined(e.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(L.hasOwnProp(t,"validateStatus")?n.validateStatus=s(void 0,t.validateStatus):delete n.validateStatus),n}const xk=["content-type","content-length"];function wk(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([s,o])=>{xk.includes(s.toLowerCase())&&t.set(s,o)})}const Sk=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16)));function Fw(t){const e=Ls({},t),n=w=>L.hasOwnProp(e,w)?e[w]:void 0,s=n("data");let o=n("withXSRFToken");const l=n("xsrfHeaderName"),u=n("xsrfCookieName");let d=n("headers");const f=n("auth"),p=n("baseURL"),g=n("allowAbsoluteUrls"),v=n("url");if(e.headers=d=Rt.from(d),e.url=Ow(Iw(p,v,g,e),n("params"),n("paramsSerializer")),f){const w=L.getSafeProp(f,"username")||"",T=L.getSafeProp(f,"password")||"";try{d.set("Authorization","Basic "+btoa(w+":"+(T?Sk(T):"")))}catch(R){throw J.from(R,J.ERR_BAD_OPTION_VALUE,t)}}if(L.isFormData(s)&&(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv||L.isReactNative(s)?d.setContentType(void 0):L.isFunction(s.getHeaders)&&wk(d,s.getHeaders(),n("formDataHeaderPolicy"))),xt.hasStandardBrowserEnv&&(L.isFunction(o)&&(o=o(e)),o===!0||o==null&&dk(e.url))){const T=l&&u&&fk.read(u);T&&d.set(l,T)}return e}const Ek=typeof XMLHttpRequest<"u",bk=Ek&&function(t){return new Promise(function(n,s){const o=Fw(t);let l=o.data;const u=Rt.from(o.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:p}=o,g,v,w,T,R;function b(){T&&T(),R&&R(),o.cancelToken&&o.cancelToken.unsubscribe(g),o.signal&&o.signal.removeEventListener("abort",g)}let S=new XMLHttpRequest;S.open(o.method.toUpperCase(),o.url,!0),S.timeout=o.timeout;function E(){if(!S)return;const P=Rt.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),F={data:!d||d==="text"||d==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:P,config:t,request:S};Mw(function(q){n(q),b()},function(q){s(q),b()},F),S=null}"onloadend"in S?S.onloadend=E:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.startsWith("file:"))||setTimeout(E)},S.onabort=function(){S&&(s(new J("Request aborted",J.ECONNABORTED,t,S)),b(),S=null)},S.onerror=function(A){const F=A&&A.message?A.message:"Network Error",B=new J(F,J.ERR_NETWORK,t,S);B.event=A||null,s(B),b(),S=null},S.ontimeout=function(){let A=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const F=o.transitional||xh;o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),s(new J(A,F.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,t,S)),b(),S=null},l===void 0&&u.setContentType(null),"setRequestHeader"in S&&L.forEach(Pw(u),function(A,F){S.setRequestHeader(F,A)}),L.isUndefined(o.withCredentials)||(S.withCredentials=!!o.withCredentials),d&&d!=="json"&&(S.responseType=o.responseType),p&&([w,R]=iu(p,!0),S.addEventListener("progress",w)),f&&S.upload&&([v,T]=iu(f),S.upload.addEventListener("progress",v),S.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(g=P=>{S&&(s(!P||P.type?new ha(null,t,S):P),S.abort(),b(),S=null)},o.cancelToken&&o.cancelToken.subscribe(g),o.signal&&(o.signal.aborted?g():o.signal.addEventListener("abort",g)));const k=lk(o.url);if(k&&!xt.protocols.includes(k)){s(new J("Unsupported protocol "+k+":",J.ERR_BAD_REQUEST,t)),b();return}S.send(l||null)})},Tk=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const n=new AbortController;let s=!1;const o=function(f){if(!s){s=!0,u();const p=f instanceof Error?f:this.reason;n.abort(p instanceof J?p:new ha(p instanceof Error?p.message:p))}};let l=e&&setTimeout(()=>{l=null,o(new J(`timeout of ${e}ms exceeded`,J.ETIMEDOUT))},e);const u=()=>{t&&(l&&clearTimeout(l),l=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),t=null)};t.forEach(f=>f.addEventListener("abort",o,{once:!0}));const{signal:d}=n;return d.unsubscribe=()=>L.asap(u),d},_k=function*(t,e){let n=t.byteLength;if(n{const o=Ck(t,e);let l=0,u,d=f=>{u||(u=!0,s&&s(f))};return new ReadableStream({async pull(f){try{const{done:p,value:g}=await o.next();if(p){d(),f.close();return}let v=g.byteLength;if(n){let w=l+=v;n(w)}f.enqueue(new Uint8Array(g))}catch(p){throw d(p),p}},cancel(f){return d(f),o.return()}},{highWaterMark:2})},ou=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,Rk=(t,e,n)=>e+2T>=2&&s.charCodeAt(T-2)===37&&s.charCodeAt(T-1)===51&&(s.charCodeAt(T)===68||s.charCodeAt(T)===100);p>=0&&(s.charCodeAt(p)===61?(f++,p--):g(p)&&(f++,p-=3)),f===1&&p>=0&&(s.charCodeAt(p)===61||g(p))&&f++;const w=Math.floor(u/4)*3-(f||0);return w>0?w:0}let l=0;for(let u=0,d=s.length;u=55296&&f<=56319&&u+1=56320&&p<=57343?(l+=4,u++):l+=3}else l+=3}return l}const Sh="1.18.1",Zy=64*1024,{isFunction:Dl}=L,Ak=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),ev=t=>{if(!L.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},tv=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Nk=t=>{const e=t.indexOf("://");let n=t;return e!==-1&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")},Ok=t=>{const e=L.global!==void 0&&L.global!==null?L.global:globalThis,{ReadableStream:n,TextEncoder:s}=e;t=L.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:o,Request:l,Response:u}=t,d=o?Dl(o):typeof fetch=="function",f=Dl(l),p=Dl(u);if(!d)return!1;const g=d&&Dl(n),v=d&&(typeof s=="function"?(E=>k=>E.encode(k))(new s):async E=>new Uint8Array(await new l(E).arrayBuffer())),w=f&&g&&tv(()=>{let E=!1;const k=new l(xt.origin,{body:new n,method:"POST",get duplex(){return E=!0,"half"}}),P=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),E&&!P}),T=p&&g&&tv(()=>L.isReadableStream(new u("").body)),R={stream:T&&(E=>E.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!R[E]&&(R[E]=(k,P)=>{let A=k&&k[E];if(A)return A.call(k);throw new J(`Response type '${E}' is not supported`,J.ERR_NOT_SUPPORT,P)})});const b=async E=>{if(E==null)return 0;if(L.isBlob(E))return E.size;if(L.isSpecCompliantForm(E))return(await new l(xt.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(L.isArrayBufferView(E)||L.isArrayBuffer(E))return E.byteLength;if(L.isURLSearchParams(E)&&(E=E+""),L.isString(E))return(await v(E)).byteLength},S=async(E,k)=>{const P=L.toFiniteNumber(E.getContentLength());return P??b(k)};return async E=>{let{url:k,method:P,data:A,signal:F,cancelToken:B,timeout:q,onDownloadProgress:U,onUploadProgress:Y,responseType:ne,headers:xe,withCredentials:Pe="same-origin",fetchOptions:Ee,maxContentLength:Z,maxBodyLength:Ce}=Fw(E);const _e=L.isNumber(Z)&&Z>-1,de=L.isNumber(Ce)&&Ce>-1,Q=X=>L.hasOwnProp(E,X)?E[X]:void 0;let se=o||fetch;ne=ne?(ne+"").toLowerCase():"text";let z=Tk([F,B&&B.toAbortSignal()],q),D=null;const $=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let fe,ye=null;const me=()=>new J("Request body larger than maxBodyLength limit",J.ERR_BAD_REQUEST,E,D);try{let X;const be=Q("auth");if(be){const Te=L.getSafeProp(be,"username")||"",ht=L.getSafeProp(be,"password")||"";X={username:Te,password:ht}}if(Nk(k)){const Te=new URL(k,xt.origin);if(!X&&(Te.username||Te.password)){const ht=ev(Te.username),hn=ev(Te.password);X={username:ht,password:hn}}(Te.username||Te.password)&&(Te.username="",Te.password="",k=Te.href)}if(X&&(xe.delete("authorization"),xe.set("Authorization","Basic "+btoa(Ak((X.username||"")+":"+(X.password||""))))),_e&&typeof k=="string"&&k.startsWith("data:")&&kk(k)>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,E,D);if(de&&P!=="get"&&P!=="head"){const Te=await b(A);if(typeof Te=="number"&&isFinite(Te)&&(fe=Te,Te>Ce))throw me()}const Ae=de&&(L.isReadableStream(A)||L.isStream(A)),Se=(Te,ht,hn)=>Jy(Te,Zy,pn=>{if(de&&pn>Ce)throw ye=me();ht&&ht(pn)},hn);if(w&&P!=="get"&&P!=="head"&&(Y||Ae)){if(fe=fe??await S(xe,A),fe!==0||Ae){let Te=new l(k,{method:"POST",body:A,duplex:"half"}),ht;if(L.isFormData(A)&&(ht=Te.headers.get("content-type"))&&xe.setContentType(ht),Te.body){const[hn,pn]=Y&&Qy(fe,iu(Gy(Y)))||[];A=Se(Te.body,hn,pn)}}}else if(Ae&&!f&&g&&P!=="get"&&P!=="head")A=Se(A);else if(Ae&&f&&!w&&P!=="get"&&P!=="head")throw new J("Stream request bodies are not supported by the current fetch implementation",J.ERR_NOT_SUPPORT,E,D);L.isString(Pe)||(Pe=Pe?"include":"omit");const at=f&&"credentials"in l.prototype;if(L.isFormData(A)){const Te=xe.getContentType();Te&&/^multipart\/form-data/i.test(Te)&&!/boundary=/i.test(Te)&&xe.delete("content-type")}xe.set("User-Agent","axios/"+Sh,!1);const Xt={...Ee,signal:z,method:P.toUpperCase(),headers:Pw(xe.normalize()),body:A,duplex:"half",credentials:at?Pe:void 0};D=f&&new l(k,Xt);let ft=await(f?se(D,Ee):se(k,Xt));const fn=Rt.from(ft.headers);if(_e){const Te=L.toFiniteNumber(fn.getContentLength());if(Te!=null&&Te>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,E,D)}const Yt=T&&(ne==="stream"||ne==="response");if(T&&ft.body&&(U||_e||Yt&&$)){const Te={};["status","statusText","headers"].forEach(Vn=>{Te[Vn]=ft[Vn]});const ht=L.toFiniteNumber(fn.getContentLength()),[hn,pn]=U&&Qy(ht,iu(Gy(U),!0))||[];let sr=0;const ir=Vn=>{if(_e&&(sr=Vn,sr>Z))throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,E,D);hn&&hn(Vn)};ft=new u(Jy(ft.body,Zy,ir,()=>{pn&&pn(),$&&$()}),Te)}ne=ne||"text";let Jt=await R[L.findKey(R,ne)||"text"](ft,E);if(_e&&!T&&!Yt){let Te;if(Jt!=null&&(typeof Jt.byteLength=="number"?Te=Jt.byteLength:typeof Jt.size=="number"?Te=Jt.size:typeof Jt=="string"&&(Te=typeof s=="function"?new s().encode(Jt).byteLength:Jt.length)),typeof Te=="number"&&Te>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,E,D)}return!Yt&&$&&$(),await new Promise((Te,ht)=>{Mw(Te,ht,{data:Jt,headers:Rt.from(ft.headers),status:ft.status,statusText:ft.statusText,config:E,request:D})})}catch(X){if($&&$(),z&&z.aborted&&z.reason instanceof J){const be=z.reason;throw be.config=E,D&&(be.request=D),X!==be&&Object.defineProperty(be,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),be}if(ye)throw D&&!ye.request&&(ye.request=D),ye;if(X instanceof J)throw D&&!X.request&&(X.request=D),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const be=new J("Network Error",J.ERR_NETWORK,E,D,X&&X.response);throw Object.defineProperty(be,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),be}throw J.from(X,X&&X.code,E,D,X&&X.response)}}},jk=new Map,Uw=t=>{let e=t&&t.env||{};const{fetch:n,Request:s,Response:o}=e,l=[s,o,n];let u=l.length,d=u,f,p,g=jk;for(;d--;)f=l[d],p=g.get(f),p===void 0&&g.set(f,p=d?new Map:Ok(e)),g=p;return p};Uw();const Eh={http:qR,xhr:bk,fetch:{get:Uw}};L.forEach(Eh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const nv=t=>`- ${t}`,Dk=t=>L.isFunction(t)||t===null||t===!1;function Lk(t,e){t=L.isArray(t)?t:[t];const{length:n}=t;let s,o;const l={};for(let u=0;u`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let d=n?u.length>1?`since : `+u.map(nv).join(` `):" "+nv(u[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+d,J.ERR_NOT_SUPPORT)}return o}const Vw={getAdapter:Lk,adapters:Eh};function kd(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ha(null,t)}function rv(t){return kd(t),t.headers=Rt.from(t.headers),t.data=Rd.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Vw.getAdapter(t.adapter||fa.adapter,t)(t).then(function(s){kd(t),t.response=s;try{s.data=Rd.call(t,t.transformResponse,s)}finally{delete t.response}return s.headers=Rt.from(s.headers),s},function(s){if(!Lw(s)&&(kd(t),s&&s.response)){t.response=s.response;try{s.response.data=Rd.call(t,t.transformResponse,s.response)}finally{delete t.response}s.response.headers=Rt.from(s.response.headers)}return Promise.reject(s)})}const vu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{vu[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const sv={};vu.transitional=function(e,n,s){function o(l,u){return"[Axios v"+Sh+"] Transitional option '"+l+"'"+u+(s?". "+s:"")}return(l,u,d)=>{if(e===!1)throw new J(o(u," has been removed"+(n?" in "+n:"")),J.ERR_DEPRECATED);return n&&!sv[u]&&(sv[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,u,d):!0}};vu.spelling=function(e){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function Mk(t,e,n){if(typeof t!="object"||t===null)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let o=s.length;for(;o-- >0;){const l=s[o],u=Object.prototype.hasOwnProperty.call(e,l)?e[l]:void 0;if(u){const d=t[l],f=d===void 0||u(d,l,t);if(f!==!0)throw new J("option "+l+" must be "+f,J.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new J("Unknown option "+l,J.ERR_BAD_OPTION)}}const Kl={assertOptions:Mk,validators:vu},Tt=Kl.validators;let Rs=class{constructor(e){this.defaults=e||{},this.interceptors={request:new qy,response:new qy}}async request(e,n){try{return await this._request(e,n)}catch(s){if(s instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const l=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(` `);return u===-1?"":o.stack.slice(u+1)})();try{if(!s.stack)s.stack=l;else if(l){const u=l.indexOf(` `),d=u===-1?-1:l.indexOf(` `,u+1),f=d===-1?"":l.slice(d+1);String(s.stack).endsWith(f)||(s.stack+=` `+l)}}catch{}}throw s}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ls(this.defaults,n);const{transitional:s,paramsSerializer:o,headers:l}=n;s!==void 0&&Kl.assertOptions(s,{silentJSONParsing:Tt.transitional(Tt.boolean),forcedJSONParsing:Tt.transitional(Tt.boolean),clarifyTimeoutError:Tt.transitional(Tt.boolean),legacyInterceptorReqResOrdering:Tt.transitional(Tt.boolean),advertiseZstdAcceptEncoding:Tt.transitional(Tt.boolean),validateStatusUndefinedResolves:Tt.transitional(Tt.boolean)},!1),o!=null&&(L.isFunction(o)?n.paramsSerializer={serialize:o}:Kl.assertOptions(o,{encode:Tt.function,serialize:Tt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Kl.assertOptions(n,{baseUrl:Tt.spelling("baseURL"),withXsrfToken:Tt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=l&&L.merge(l.common,l[n.method]);l&&L.forEach(["delete","get","head","post","put","patch","query","common"],R=>{delete l[R]}),n.headers=Rt.concat(u,l);const d=[];let f=!0;this.interceptors.request.forEach(function(b){if(typeof b.runWhen=="function"&&b.runWhen(n)===!1)return;f=f&&b.synchronous;const S=n.transitional||xh;S&&S.legacyInterceptorReqResOrdering?d.unshift(b.fulfilled,b.rejected):d.push(b.fulfilled,b.rejected)});const p=[];this.interceptors.response.forEach(function(b){p.push(b.fulfilled,b.rejected)});let g,v=0,w;if(!f){const R=[rv.bind(this),void 0];for(R.unshift(...d),R.push(...p),w=R.length,g=Promise.resolve(n);v{if(!s._listeners)return;let l=s._listeners.length;for(;l-- >0;)s._listeners[l](o);s._listeners=null}),this.promise.then=o=>{let l;const u=new Promise(d=>{s.subscribe(d),l=d}).then(o);return u.cancel=function(){s.unsubscribe(l)},u},e(function(l,u,d){s.reason||(s.reason=new ha(l,u,d),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=s=>{e.abort(s)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Bw(function(o){e=o}),cancel:e}}};function Fk(t){return function(n){return t.apply(null,n)}}function Uk(t){return L.isObject(t)&&t.isAxiosError===!0}const _f={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(_f).forEach(([t,e])=>{_f[e]=t});function zw(t){const e=new Rs(t),n=vw(Rs.prototype.request,e);return L.extend(n,Rs.prototype,e,{allOwnKeys:!0}),L.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return zw(Ls(t,o))},n}const tt=zw(fa);tt.Axios=Rs;tt.CanceledError=ha;tt.CancelToken=Ik;tt.isCancel=Lw;tt.VERSION=Sh;tt.toFormData=yu;tt.AxiosError=J;tt.Cancel=tt.CanceledError;tt.all=function(e){return Promise.all(e)};tt.spread=Fk;tt.isAxiosError=Uk;tt.mergeConfig=Ls;tt.AxiosHeaders=Rt;tt.formToJSON=t=>Dw(L.isHTMLForm(t)?new FormData(t):t);tt.getAdapter=Vw.getAdapter;tt.HttpStatusCode=_f;tt.default=tt;const{Axios:uM,AxiosError:cM,CanceledError:dM,isCancel:fM,CancelToken:hM,VERSION:pM,all:mM,Cancel:gM,isAxiosError:yM,spread:vM,toFormData:xM,AxiosHeaders:wM,HttpStatusCode:SM,formToJSON:EM,getAdapter:bM,mergeConfig:TM,create:_M}=tt,$w=typeof window>"u",iv=!$w&&window.self!==window.top,Vk=!$w&&typeof document>"u",Ad=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),gt=[];for(let t=0;t<256;++t)gt.push((t+256).toString(16).slice(1));function Bk(t,e=0){return(gt[t[e+0]]+gt[t[e+1]]+gt[t[e+2]]+gt[t[e+3]]+"-"+gt[t[e+4]]+gt[t[e+5]]+"-"+gt[t[e+6]]+gt[t[e+7]]+"-"+gt[t[e+8]]+gt[t[e+9]]+"-"+gt[t[e+10]]+gt[t[e+11]]+gt[t[e+12]]+gt[t[e+13]]+gt[t[e+14]]+gt[t[e+15]]).toLowerCase()}let Nd;const zk=new Uint8Array(16);function $k(){if(!Nd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Nd=crypto.getRandomValues.bind(crypto)}return Nd(zk)}const Wk=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ov={randomUUID:Wk};function Hk(t,e,n){var o;t=t||{};const s=t.random??((o=t.rng)==null?void 0:o.call(t))??$k();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Bk(s)}function qk(t,e,n){return ov.randomUUID&&!t?ov.randomUUID():Hk(t)}const Ro=typeof window<"u"?window:{base44SharedInstances:{}};function Kk(t,e){return Ro.base44SharedInstances||(Ro.base44SharedInstances={}),Ro.base44SharedInstances[t]||(Ro.base44SharedInstances[t]={instance:e()}),Ro.base44SharedInstances[t].instance}const Qk="__user_heartbeat_event__",Gk="__initialization_event__",Xk="__session_duration_event__",av="analytics-enable",lv="base44_analytics_session_id",Yk={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},Jk="analytics",Ue=Kk(Jk,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...Yk,...oA()}})),Zk=({axiosClient:t,serverUrl:e,appId:n,userAuthModule:s})=>{var o;const{maxQueueSize:l,throttleTime:u,batchSize:d}=Ue.config;if(!(!((o=Ue.config)===null||o===void 0)&&o.enabled)||Vk)return{track:()=>{},cleanup:()=>{}};let f;const p=`${e}/api/apps/${n}/analytics/track/batch`,g=async P=>{await t.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:P}})},v=P=>{try{const A=JSON.stringify({events:P}),F=new Blob([A],{type:"application/json"});return typeof navigator>"u"||A.length>6e4||!navigator.sendBeacon(p,F)}catch{return!1}},w=async(P,A={})=>{if(P.length===0)return;const F=await iA(s),B=P.map(sA(F));try{(!A.isBeacon||!v(B))&&await g(B)}catch{}},T=()=>{cv(w,{throttleTime:u,batchSize:d})},R=P=>{if(Ue.requestsQueue.length>=l)return;const A=rA();Ue.requestsQueue.push({...P,...A}),T()},b=()=>{cv(w,{throttleTime:u,batchSize:d}),f=dv(R),tA()},S=()=>{uv(),f==null||f(),nA(R);const P=Ue.requestsQueue.splice(0);w(P,{isBeacon:!0})},E=()=>{typeof window>"u"||(document.visibilityState==="hidden"?S():document.visibilityState==="visible"&&b())},k=()=>{uv(),f==null||f(),typeof window<"u"&&window.removeEventListener("visibilitychange",E)};return T(),f=dv(R),eA(R),typeof window<"u"&&window.addEventListener("visibilitychange",E),{track:R,cleanup:k}};function uv(){Ue.isProcessing=!1}async function cv(t,e){if(Ue.isProcessing)return;Ue.isProcessing=!0;const{throttleTime:n=1e3,batchSize:s=30}=e??{};for(;Ue.isProcessing&&Ue.requestsQueue.length>0;){const o=Ue.requestsQueue.splice(0,s);o.length&&await t(o),await new Promise(l=>setTimeout(l,n))}Ue.isProcessing=!1}function dv(t){var e;if(Ue.isHeartBeatProcessing||((e=Ue.config.heartBeatInterval)!==null&&e!==void 0?e:0)<10)return()=>{};Ue.isHeartBeatProcessing=!0;const n=setInterval(()=>{t({eventName:Qk})},Ue.config.heartBeatInterval);return()=>{clearInterval(n),Ue.isHeartBeatProcessing=!1}}function eA(t){typeof window>"u"||Ue.wasInitializationTracked||(Ue.wasInitializationTracked=!0,t({eventName:Gk,properties:{referrer:document==null?void 0:document.referrer}}))}function tA(){typeof window>"u"||Ue.sessionStartTime!==null||(Ue.sessionStartTime=new Date().toISOString())}function nA(t){if(typeof window>"u"||Ue.sessionStartTime===null)return;const e=new Date().getTime()-new Date(Ue.sessionStartTime).getTime();Ue.sessionStartTime=null,t({eventName:Xk,properties:{sessionDuration:e}})}function rA(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function sA(t){return e=>({event_name:e.eventName,properties:e.properties,timestamp:e.timestamp,page_url:e.pageUrl,...t})}let Od=null;async function iA(t){if(!Ue.sessionContext){if(!Od){const e=bh();Od=t.me().then(n=>({user_id:n.id,session_id:e})).catch(()=>({user_id:null,session_id:e}))}Ue.sessionContext=await Od}return Ue.sessionContext}function oA(){if(typeof window>"u"||!window.location)return;const e=new URLSearchParams(window.location.search).get(av);if(e==null||!e.length)return;const n=new URLSearchParams(window.location.search);n.delete(av);const s=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",s),{enabled:e==="true"}}function bh(){if(typeof window>"u")return Ad();try{const t=localStorage.getItem(lv);if(!t){const e=Ad();return localStorage.setItem(lv,e),e}return t}catch{return Ad()}}class aA extends Error{constructor(e,n,s,o,l){super(e),this.name="Base44Error",this.status=n,this.code=s,this.data=o,this.originalError=l}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Oo({baseURL:t,headers:e={},token:n,interceptResponses:s=!0,onError:o}){const l=tt.create({baseURL:t,headers:{"Content-Type":"application/json",Accept:"application/json",...e}});return n&&(l.defaults.headers.common.Authorization=`Bearer ${n}`),l.interceptors.request.use(u=>{typeof window<"u"&&window.location&&(u.headers.set("X-Origin-URL",window.location.href),u.headers.get("Authorization")||u.headers.set("X-Base44-Anonymous-Id",bh()));const d=qk();if(u.requestId=d,iv)try{window.parent.postMessage({type:"api-request-start",requestId:d,data:{url:t+u.url,method:u.method,body:u.data instanceof FormData?"[FormData object]":u.data}},"*")}catch{}return u}),s&&l.interceptors.response.use(u=>{var d;const f=(d=u.config)===null||d===void 0?void 0:d.requestId;try{iv&&f&&window.parent.postMessage({type:"api-request-end",requestId:f,data:{statusCode:u.status,response:u.data}},"*")}catch{}return u.data},u=>{var d,f,p,g,v,w,T,R;const b=((f=(d=u.response)===null||d===void 0?void 0:d.data)===null||f===void 0?void 0:f.message)||((g=(p=u.response)===null||p===void 0?void 0:p.data)===null||g===void 0?void 0:g.detail)||u.message,S=new aA(b,(v=u.response)===null||v===void 0?void 0:v.status,(T=(w=u.response)===null||w===void 0?void 0:w.data)===null||T===void 0?void 0:T.code,(R=u.response)===null||R===void 0?void 0:R.data,u);return o==null||o(S),Promise.reject(S)}),l}function fv(t){const{axios:e,appId:n,getSocket:s}=t;return new Proxy({},{get(o,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return uA(e,n,l,s)}})}function lA(t){var e;try{const n=JSON.parse(t);return{type:n.type,data:n.data,id:n.id||((e=n.data)===null||e===void 0?void 0:e.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function uA(t,e,n,s){const o=`/apps/${e}/entities/${n}`;return{async list(l,u,d,f){const p={};return l&&(p.sort=l),u&&(p.limit=u),d&&(p.skip=d),f&&(p.fields=Array.isArray(f)?f.join(","):f),t.get(o,{params:p})},async filter(l,u,d,f,p){const g={q:JSON.stringify(l)};return u&&(g.sort=u),d&&(g.limit=d),f&&(g.skip=f),p&&(g.fields=Array.isArray(p)?p.join(","):p),t.get(o,{params:g})},async get(l){return t.get(`${o}/${l}`)},async create(l){return t.post(o,l)},async update(l,u){return t.put(`${o}/${l}`,u)},async delete(l){return t.delete(`${o}/${l}`)},async deleteMany(l){return t.delete(o,{data:l})},async bulkCreate(l){return t.post(`${o}/bulk`,l)},async updateMany(l,u){return t.patch(`${o}/update-many`,{query:l,data:u})},async bulkUpdate(l){return t.put(`${o}/bulk`,l)},async importEntities(l){const u=new FormData;return u.append("file",l,l.name),t.post(`${o}/import`,u,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(l){const u=`entities:${e}:${n}`;return s().subscribeToRoom(u,{update_model:p=>{var g;const v=lA(p.data);if(v){v.type!=="delete"&&(!((g=v.data)===null||g===void 0)&&g._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${v.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${v.id}")\` to fetch the full record.`);try{l(v)}catch(w){console.error("[Base44 SDK] Subscription callback error:",w)}}}})}}}function cA(t,e){return{async call(n,s,o){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(s!=null&&s.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:l,queryParams:u,...d}=o??{},f={...d,...l&&{path_params:l},...u&&{query_params:u}};return await t.post(`/apps/${e}/integrations/custom/${n}/${s}`,f)}}}function hv(t,e){const n=cA(t,e);return new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return o==="custom"?n:new Proxy({},{get(l,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return async d=>{if(typeof d=="string")throw new Error(`Integration ${u} must receive an object with named parameters, received: ${d}`);let f,p;return d instanceof FormData||d&&Object.values(d).some(g=>g instanceof File)?(f=new FormData,Object.keys(d).forEach(g=>{d[g]instanceof File?f.append(g,d[g],d[g].name):typeof d[g]=="object"&&d[g]!==null?f.append(g,JSON.stringify(d[g])):f.append(g,d[g])}),p="multipart/form-data"):(f=d,p="application/json"),o==="Core"?t.post(`/apps/${e}/integration-endpoints/Core/${u}`,f||d,{headers:{"Content-Type":p}}):t.post(`/apps/${e}/integration-endpoints/installable/${o}/integration-endpoints/${u}`,f||d,{headers:{"Content-Type":p}})}}})}})}function dA(){return typeof window>"u"?!1:window!==window.parent}function fA(t,e,n){const l=Math.round(window.screenX+(window.outerWidth-500)/2),u=Math.round(window.screenY+(window.outerHeight-600)/2),d=window.open(t,"base44_auth",`width=500,height=600,left=${l},top=${u},resizable=yes,scrollbars=yes`);if(!d)return;const f=()=>{window.removeEventListener("message",p),clearInterval(g),d.closed||d.close()},p=v=>{var w;if(v.origin!==n||v.source!==d||!(!((w=v.data)===null||w===void 0)&&w.access_token))return;f();const T=new URL(e),{access_token:R,is_new_user:b}=v.data;T.searchParams.set("access_token",R),b!=null&&T.searchParams.set("is_new_user",String(b)),window.location.href=T.toString()},g=setInterval(()=>{d.closed&&f()},500);window.addEventListener("message",p)}function hA(t,e,n,s){return{async me(){return t.get(`/apps/${n}/entities/User/me`)},async updateMe(o){return t.put(`/apps/${n}/entities/User/me`,o)},redirectToLogin(o){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const l=o?new URL(o,window.location.origin).toString():window.location.href,u=`${s.appBaseUrl}/login?from_url=${encodeURIComponent(l)}`;window.location.href=u},loginWithProvider(o,l="/"){const u=new URL(l,window.location.origin).toString(),d=`app_id=${n}&from_url=${encodeURIComponent(u)}`;let f;o==="sso"?f=`/apps/${n}/auth/sso/login`:f=`/apps/auth${o==="google"?"":`/${o}`}/login`;const p=`${s.appBaseUrl}/api${f}?${d}`;if(dA()){const g=`${p}&popup_origin=${encodeURIComponent(window.location.origin)}`;return fA(g,u,window.location.origin)}window.location.href=p},logout(o){if(delete t.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(d){console.error("Failed to remove token from localStorage:",d)}const l=o||window.location.href,u=`${s.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(l)}`;window.location.href=u}},setToken(o,l=!0){if(o&&(t.defaults.headers.common.Authorization=`Bearer ${o}`,e.defaults.headers.common.Authorization=`Bearer ${o}`,l&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",o),window.localStorage.setItem("token",o)}catch(u){console.error("Failed to save token to localStorage:",u)}},async loginViaEmailPassword(o,l,u){var d;try{const f=await t.post(`/apps/${n}/auth/login`,{email:o,password:l,...u&&{turnstile_token:u}}),{access_token:p,user:g}=f;return p&&this.setToken(p),{access_token:p,user:g}}catch(f){throw((d=f.response)===null||d===void 0?void 0:d.status)===401&&await this.logout(),f}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(o,l){return t.post(`/apps/${n}/users/invite-user`,{user_email:o,role:l})},register(o){return t.post(`/apps/${n}/auth/register`,o)},verifyOtp({email:o,otpCode:l}){return t.post(`/apps/${n}/auth/verify-otp`,{email:o,otp_code:l})},resendOtp(o){return t.post(`/apps/${n}/auth/resend-otp`,{email:o})},resetPasswordRequest(o){return t.post(`/apps/${n}/auth/reset-password-request`,{email:o})},resetPassword({resetToken:o,newPassword:l}){return t.post(`/apps/${n}/auth/reset-password`,{reset_token:o,new_password:l})},changePassword({userId:o,currentPassword:l,newPassword:u}){return t.post(`/apps/${n}/auth/change-password`,{user_id:o,current_password:l,new_password:u})}}}function pA(t,e){return{async getAccessToken(n){const s=`/apps/${e}/auth/sso/accesstoken/${n}`;return t.get(s)},async getIdToken(n){const s=`/apps/${e}/auth/sso/idtoken/${n}`;return t.get(s)}}}function mA(t,e){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await t.get(`/apps/${e}/external-auth/tokens/${n}`)).access_token},async getConnection(n){var s;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const l=await t.get(`/apps/${e}/external-auth/tokens/${n}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getWorkspaceConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await t.get(`/apps/${e}/external-auth/tokens/connectors/${n}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await t.get(`/apps/${e}/app-user-auth/connectors/${n}/token`)).access_token},async getCurrentAppUserConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await t.get(`/apps/${e}/app-user-auth/connectors/${n}/token`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}}}}function gA(t,e){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await t.post(`/apps/${e}/app-user-auth/connectors/${n}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await t.delete(`/apps/${e}/app-user-auth/connectors/${n}`)}}}function ks(t={}){const{storageKey:e="base44_access_token",paramName:n="access_token",saveToStorage:s=!0,removeFromUrl:o=!0}=t;let l=null;if(typeof window<"u"&&window.location)try{const u=new URLSearchParams(window.location.search);if(l=u.get(n),l){if(s&&yA(l,{storageKey:e}),o){u.delete(n);const d=`${window.location.pathname}${u.toString()?`?${u.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}return l}}catch(u){console.error("Error retrieving token from URL:",u)}if(typeof window<"u"&&window.localStorage)try{return l=window.localStorage.getItem(e),l}catch(u){console.error("Error retrieving token from local storage:",u)}return null}function yA(t,e){const{storageKey:n="base44_access_token"}=e;if(typeof window>"u"||!window.localStorage||!t)return!1;try{return window.localStorage.setItem(n,t),window.localStorage.setItem("token",t),!0}catch(s){return console.error("Error saving token to local storage:",s),!1}}function pv(t,e,n){const s=(l,u)=>l?`${String(l).replace(/\/$/,"")}${u}`:u,o=l=>{const u=new Headers;if(n!=null&&n.getAuthHeaders){const d=n.getAuthHeaders();Object.entries(d).forEach(([f,p])=>{p!=null&&u.set(f,String(p))})}return l&&new Headers(l).forEach((d,f)=>{u.set(f,d)}),u};return{async invoke(l,u){if(typeof u=="string")throw new Error(`Function ${l} must receive an object with named parameters, received: ${u}`);let d,f;return u instanceof FormData||u&&Object.values(u).some(p=>p instanceof File)?(d=new FormData,Object.keys(u).forEach(p=>{u[p]instanceof File?d.append(p,u[p],u[p].name):typeof u[p]=="object"&&u[p]!==null?d.append(p,JSON.stringify(u[p])):d.append(p,u[p])}),f="multipart/form-data"):(d=u,f="application/json"),t.post(`/apps/${e}/functions/${l}`,d||u,{headers:{"Content-Type":f}})},async fetch(l,u={}){const f=`/functions${l.startsWith("/")?l:`/${l}`}`,p=o(u.headers),g={...u,headers:p};return await fetch(s(n==null?void 0:n.baseURL,f),g)}}}function mv({axios:t,getSocket:e,appId:n,serverUrl:s,token:o}){const l=`/apps/${n}/agents`,u={},d=()=>t.get(`${l}/conversations`),f=b=>t.get(`${l}/conversations/${b}`);return{getConversations:d,getConversation:f,listConversations:b=>t.get(`${l}/conversations`,{params:b}),createConversation:b=>t.post(`${l}/conversations`,b),addMessage:async(b,S)=>t.post(`${l}/conversations/v2/${b.id}/messages`,S),subscribeToConversation:(b,S)=>{const E=`/agent-conversations/${b}`,k=e(),P=f(b).then(A=>(u[b]=A,A));return k.subscribeToRoom(E,{connect:()=>{},update_model:async({data:A})=>{const F=JSON.parse(A);if(F._message){await P;const B=F._message,q=u[b];if(q){const U=q.messages||[],Y=U.findIndex(xe=>xe.id===B.id),ne=Y!==-1?U.map((xe,Pe)=>Pe===Y?B:xe):[...U,B];u[b]={...q,messages:ne},S==null||S(u[b])}}}})},getWhatsAppConnectURL:b=>{const S=`${s}/api/apps/${n}/agents/${encodeURIComponent(b)}/whatsapp`,E=o??ks();return E?`${S}?token=${E}`:S},getTelegramConnectURL:b=>{const S=`${s}/api/apps/${n}/agents/${encodeURIComponent(b)}/telegram`,E=o??ks();return E?`${S}?token=${E}`:S}}}function gv({serverUrl:t,token:e,appId:n}){return{connection:()=>{var o;return{baseURL:`${t}/api/apps/${n}/ai/openai/v1`,token:(o=e??ks())!==null&&o!==void 0?o:""}}}}function yv(t,e){const n=`/app-logs/${e}`;return{async logUserInApp(s){await t.post(`${n}/log-user-in-app/${s}`)},async fetchLogs(s={}){return await t.get(n,{params:s})},async getStats(s={}){return await t.get(`${n}/stats`,{params:s})}}}function vA(t,e){return{async inviteUser(n,s){if(s!=="user"&&s!=="admin")throw new Error(`Invalid role: "${s}". Role must be either "user" or "admin".`);return await t.post(`/apps/${e}/runtime/users/invite-user`,{user_email:n,role:s})}}}const Fn=Object.create(null);Fn.open="0";Fn.close="1";Fn.ping="2";Fn.pong="3";Fn.message="4";Fn.upgrade="5";Fn.noop="6";const Ql=Object.create(null);Object.keys(Fn).forEach(t=>{Ql[Fn[t]]=t});const Cf={type:"error",data:"parser error"},Ww=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Hw=typeof ArrayBuffer=="function",qw=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Th=({type:t,data:e},n,s)=>Ww&&e instanceof Blob?n?s(e):vv(e,s):Hw&&(e instanceof ArrayBuffer||qw(e))?n?s(e):vv(new Blob([e]),s):s(Fn[t]+(e||"")),vv=(t,e)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];e("b"+(s||""))},n.readAsDataURL(t)};function xv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let jd;function xA(t,e){if(Ww&&t.data instanceof Blob)return t.data.arrayBuffer().then(xv).then(e);if(Hw&&(t.data instanceof ArrayBuffer||qw(t.data)))return e(xv(t.data));Th(t,!1,n=>{jd||(jd=new TextEncoder),e(jd.encode(n))})}const wv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,s,o=0,l,u,d,f;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const p=new ArrayBuffer(e),g=new Uint8Array(p);for(s=0;s>4,g[o++]=(u&15)<<4|d>>2,g[o++]=(d&3)<<6|f&63;return p},SA=typeof ArrayBuffer=="function",_h=(t,e)=>{if(typeof t!="string")return{type:"message",data:Kw(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:EA(t.substring(1),e)}:Ql[n]?t.length>1?{type:Ql[n],data:t.substring(1)}:{type:Ql[n]}:Cf},EA=(t,e)=>{if(SA){const n=wA(t);return Kw(n,e)}else return{base64:!0,data:t}},Kw=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},Qw="",bA=(t,e)=>{const n=t.length,s=new Array(n);let o=0;t.forEach((l,u)=>{Th(l,!1,d=>{s[u]=d,++o===n&&e(s.join(Qw))})})},TA=(t,e)=>{const n=t.split(Qw),s=[];for(let o=0;o{const s=n.length;let o;if(s<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,s);else if(s<65536){o=new Uint8Array(3);const l=new DataView(o.buffer);l.setUint8(0,126),l.setUint16(1,s)}else{o=new Uint8Array(9);const l=new DataView(o.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(s))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}let Dd;function Ll(t){return t.reduce((e,n)=>e+n.length,0)}function Ml(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let s=0;for(let o=0;oMath.pow(2,21)-1){d.enqueue(Cf);break}o=g*Math.pow(2,32)+p.getUint32(4),s=3}else{if(Ll(n)t){d.enqueue(Cf);break}}}})}const Gw=4;function rt(t){if(t)return PA(t)}function PA(t){for(var e in rt.prototype)t[e]=rt.prototype[e];return t}rt.prototype.on=rt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};rt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};rt.prototype.off=rt.prototype.removeListener=rt.prototype.removeAllListeners=rt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var s,o=0;oPromise.resolve().then(e):(e,n)=>n(e,0),cn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),RA="arraybuffer";function Xw(t,...e){return e.reduce((n,s)=>(t.hasOwnProperty(s)&&(n[s]=t[s]),n),{})}const kA=cn.setTimeout,AA=cn.clearTimeout;function wu(t,e){e.useNativeTimers?(t.setTimeoutFn=kA.bind(cn),t.clearTimeoutFn=AA.bind(cn)):(t.setTimeoutFn=cn.setTimeout.bind(cn),t.clearTimeoutFn=cn.clearTimeout.bind(cn))}const NA=1.33;function OA(t){return typeof t=="string"?jA(t):Math.ceil((t.byteLength||t.size)*NA)}function jA(t){let e=0,n=0;for(let s=0,o=t.length;s=57344?n+=3:(s++,n+=4);return n}function Yw(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function DA(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function LA(t){let e={},n=t.split("&");for(let s=0,o=n.length;s{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};TA(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,bA(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Yw()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}let Jw=!1;try{Jw=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const FA=Jw;function UA(){}class VA extends IA{constructor(e){if(super(e),typeof location<"u"){const n=location.protocol==="https:";let s=location.port;s||(s=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,n){const s=this.request({method:"POST",data:e});s.on("success",n),s.on("error",(o,l)=>{this.onError("xhr post error",o,l)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=e}}class Ln extends rt{constructor(e,n,s){super(),this.createRequest=e,wu(this,s),this._opts=s,this._method=s.method||"GET",this._uri=n,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const n=Xw(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(n);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var o;s.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=Ln.requestsCount++,Ln.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=UA,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ln.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Ln.requestsCount=0;Ln.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Sv);else if(typeof addEventListener=="function"){const t="onpagehide"in cn?"pagehide":"unload";addEventListener(t,Sv,!1)}}function Sv(){for(let t in Ln.requests)Ln.requests.hasOwnProperty(t)&&Ln.requests[t].abort()}const BA=(function(){const t=Zw({xdomain:!1});return t&&t.responseType!==null})();class zA extends VA{constructor(e){super(e);const n=e&&e.forceBase64;this.supportsBinary=BA&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Ln(Zw,this.uri(),e)}}function Zw(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||FA))return new XMLHttpRequest}catch{}if(!e)try{return new cn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const e1=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class $A extends Ch{get name(){return"websocket"}doOpen(){const e=this.uri(),n=this.opts.protocols,s=e1?{}:Xw(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,s)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{try{this.doWrite(s,l)}catch{}o&&xu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Yw()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}}const Ld=cn.WebSocket||cn.MozWebSocket;class WA extends $A{createSocket(e,n,s){return e1?new Ld(e,n,s):n?new Ld(e,n):new Ld(e)}doWrite(e,n){this.ws.send(n)}}class HA extends Ch{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const n=CA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(n).getReader(),o=_A();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();const l=()=>{s.read().then(({done:d,value:f})=>{d||(this.onPacket(f),l())}).catch(d=>{})};l();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n{o&&xu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const qA={websocket:WA,webtransport:HA,polling:zA},KA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,QA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Pf(t){if(t.length>8e3)throw"URI too long";const e=t,n=t.indexOf("["),s=t.indexOf("]");n!=-1&&s!=-1&&(t=t.substring(0,n)+t.substring(n,s).replace(/:/g,";")+t.substring(s,t.length));let o=KA.exec(t||""),l={},u=14;for(;u--;)l[QA[u]]=o[u]||"";return n!=-1&&s!=-1&&(l.source=e,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=GA(l,l.path),l.queryKey=XA(l,l.query),l}function GA(t,e){const n=/\/{2,9}/g,s=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function XA(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,l){o&&(n[o]=l)}),n}const Rf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Gl=[];Rf&&addEventListener("offline",()=>{Gl.forEach(t=>t())},!1);class Br extends rt{constructor(e,n){if(super(),this.binaryType=RA,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){const s=Pf(e);n.hostname=s.host,n.secure=s.protocol==="https"||s.protocol==="wss",n.port=s.port,s.query&&(n.query=s.query)}else n.host&&(n.hostname=Pf(n.host).host);wu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(s=>{const o=s.prototype.name;this.transports.push(o),this._transportsByName[o]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=LA(this.opts.query)),Rf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Gl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=Gw,n.transport=e,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Br.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Br.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s0&&n>this._maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,xu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,s){return this._sendPacket("message",e,n,s),this}send(e,n,s){return this._sendPacket("message",e,n,s),this}_sendPacket(e,n,s,o){if(typeof n=="function"&&(o=n,n=void 0),typeof s=="function"&&(o=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const l={type:e,data:n,options:s};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(Br.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Rf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Gl.indexOf(this._offlineEventListener);s!==-1&&Gl.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}}Br.protocol=Gw;class YA extends Br{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",v=>{if(!s)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Br.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(g(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=n.name,this.emitReserved("upgradeError",w)}}))};function l(){s||(s=!0,g(),n.close(),n=null)}const u=v=>{const w=new Error("probe error: "+v);w.transport=n.name,l(),this.emitReserved("upgradeError",w)};function d(){u("transport closed")}function f(){u("socket closed")}function p(v){n&&v.name!==n.name&&l()}const g=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",d),this.off("close",f),this.off("upgrading",p)};n.once("open",o),n.once("error",u),n.once("close",d),this.once("close",f),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const n=[];for(let s=0;sqA[l]).filter(l=>!!l)),super(s?o:e,o)}};function ZA(t,e="",n){let s=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),s=Pf(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const l=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+l+":"+s.port+e,s.href=s.protocol+"://"+l+(n&&n.port===s.port?"":":"+s.port),s}const eN=typeof ArrayBuffer=="function",tN=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,t1=Object.prototype.toString,nN=typeof Blob=="function"||typeof Blob<"u"&&t1.call(Blob)==="[object BlobConstructor]",rN=typeof File=="function"||typeof File<"u"&&t1.call(File)==="[object FileConstructor]";function Ph(t){return eN&&(t instanceof ArrayBuffer||tN(t))||nN&&t instanceof Blob||rN&&t instanceof File}function Xl(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,s=t.length;n=0&&t.numthis.opts.maxAttachments)throw new Error("too many attachments");s.attachments=d}if(e.charAt(n+1)==="/"){const l=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););s.nsp=e.substring(l,n)}else s.nsp="/";const o=e.charAt(n+1);if(o!==""&&Number(o)==o){const l=n+1;for(;++n;){const u=e.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===e.length)break}s.id=Number(e.substring(l,n+1))}if(e.charAt(++n)){const l=this.tryParse(e.substr(n));if(Rh.isPayloadValid(s.type,l))s.data=l;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case je.CONNECT:return Ev(n);case je.DISCONNECT:return n===void 0;case je.CONNECT_ERROR:return typeof n=="string"||Ev(n);case je.EVENT:case je.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&oN.indexOf(n[0])===-1);case je.ACK:case je.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class lN{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=iN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const uN=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function Ev(t){return Object.prototype.toString.call(t)==="[object Object]"}const cN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Rh,Encoder:aN,get PacketType(){return je}},Symbol.toStringTag,{value:"Module"}));function _n(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const dN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class n1 extends rt{constructor(e,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[_n(e,"open",this.onopen.bind(this)),_n(e,"packet",this.onpacket.bind(this)),_n(e,"error",this.onerror.bind(this)),_n(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var s,o,l;if(dN.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:je.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,v=n.pop();this._registerAckCallback(g,v),u.id=g}const d=(o=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((l=this.io.engine)===null||l===void 0)&&l._hasPingExpired());return this.flags.volatile&&!d||(f?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(e,n){var s;const o=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let d=0;d{this.io.clearTimeoutFn(l),n.apply(this,d)};u.withError=!0,this.acks[e]=u}emitWithAck(e,...n){return new Promise((s,o)=>{const l=(u,d)=>u?o(u):s(d);l.withError=!0,n.push(l),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...l)=>(this._queue[0],o!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...l)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:je.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){const s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case je.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case je.EVENT:case je.BINARY_EVENT:this.onevent(e);break;case je.ACK:case je.BINARY_ACK:this.onack(e);break;case je.DISCONNECT:this.ondisconnect();break;case je.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let s=!1;return function(...o){s||(s=!0,n.packet({type:je.ACK,id:e,data:o}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:je.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let s=0;s0&&t.jitter<=1?t.jitter:0,this.attempts=0}Ii.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};Ii.prototype.reset=function(){this.attempts=0};Ii.prototype.setMin=function(t){this.ms=t};Ii.prototype.setMax=function(t){this.max=t};Ii.prototype.setJitter=function(t){this.jitter=t};class Nf extends rt{constructor(e,n){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,wu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Ii({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const o=n.parser||cN;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new JA(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=_n(n,"open",function(){s.onopen(),e&&e()}),l=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),e?e(d):this.maybeReconnectOnOpen()},u=_n(n,"error",l);if(this._timeout!==!1){const d=this._timeout,f=this.setTimeoutFn(()=>{o(),l(new Error("timeout")),n.close()},d);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(o),this.subs.push(u),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(_n(e,"ping",this.onping.bind(this)),_n(e,"data",this.ondata.bind(this)),_n(e,"error",this.onerror.bind(this)),_n(e,"close",this.onclose.bind(this)),_n(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){xu(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new n1(this,e,n),this.nsps[e]=s),s}_destroy(e){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let s=0;se()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const ko={};function Yl(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=ZA(t,e.path||"/socket.io"),s=n.source,o=n.id,l=n.path,u=ko[o]&&l in ko[o].nsps,d=e.forceNew||e["force new connection"]||e.multiplex===!1||u;let f;return d?f=new Nf(s,e):(ko[o]||(ko[o]=new Nf(s,e)),f=ko[o]),n.query&&!e.query&&(e.query=n.queryKey),f.socket(n.path,e)}Object.assign(Yl,{Manager:Nf,Socket:n1,io:Yl,connect:Yl});const fN=250;function bv(t,e){var n;const s=(n=t.token)!==null&&n!==void 0?n:ks(),o={app_id:t.appId,token:s};s||(o.anonymous_id=bh());const l=Yl(t.serverUrl,{path:t.mountPath,transports:t.transports,query:o});return l.on("connect",async()=>{var u;return console.log("connect",l.id),(u=e.connect)===null||u===void 0?void 0:u.call(e)}),l.on("update_model",async u=>{var d;return(d=e.update_model)===null||d===void 0?void 0:d.call(e,u)}),l.on("error",async u=>{var d;return(d=e.error)===null||d===void 0?void 0:d.call(e,u)}),l.on("connect_error",async u=>{var d;return console.error("connect_error",u),(d=e.error)===null||d===void 0?void 0:d.call(e,u)}),l}function hN({config:t}){let e={...t};const n={},s={},o={connect:async()=>{const E=[];Object.keys(n).forEach(k=>{const P=w(k);P.length!==0&&(p(k),P.forEach(({connect:A})=>{const F=async()=>A==null?void 0:A();E.push(F())}))}),await Promise.all(E)},update_model:async E=>{const P=w(E.room).map(A=>{var F;return(F=A.update_model)===null||F===void 0?void 0:F.call(A,E)});await Promise.all(P)},error:async E=>{console.error("error",E);const k=Object.values(n).flat().map(P=>{var A;return(A=P.error)===null||A===void 0?void 0:A.call(P,E)});await Promise.all(k)}};let l=bv(t,o);function u(){d()}function d(){R(),l&&l.disconnect()}function f(E){u(),e={...e,...E},l=bv(e,o)}function p(E){l.emit("join",E)}function g(E){l.emit("leave",E)}async function v(E,k){var P;const A=JSON.stringify(k);return(P=o.update_model)===null||P===void 0?void 0:P.call(o,{room:E,data:A})}function w(E){var k;return(k=n[E])!==null&&k!==void 0?k:[]}function T(E){const k=s[E];k&&(clearTimeout(k),delete s[E])}function R(){Object.keys(s).forEach(E=>{var k,P;clearTimeout(s[E]),delete s[E],((P=(k=n[E])===null||k===void 0?void 0:k.length)!==null&&P!==void 0?P:0)===0&&delete n[E]})}function b(E){T(E),s[E]=setTimeout(()=>{var k,P;delete s[E],!(((P=(k=n[E])===null||k===void 0?void 0:k.length)!==null&&P!==void 0?P:0)>0)&&(g(E),delete n[E])},fN)}return{socket:l,subscribeToRoom:(E,k)=>{n[E]?T(E):(p(E),n[E]=[]),n[E].push(k);let P=!1;return()=>{var A,F;P||(P=!0,n[E]=(F=(A=n[E])===null||A===void 0?void 0:A.filter(B=>B!==k))!==null&&F!==void 0?F:[],n[E].length===0&&b(E))}},updateConfig:f,updateModel:v,disconnect:d}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var r1=class extends Event{constructor(e,n){super("error",n);Me(this,"message");Me(this,"error");this.message=e.message,this.error=e}},s1=class extends Event{constructor(e=1e3,n="",s){super("close",s);Me(this,"code");Me(this,"reason");Me(this,"wasClean",!0);this.code=e,this.reason=n}},Md={Event,ErrorEvent:r1,CloseEvent:s1};function pN(t,e){if(!t)throw new Error(e)}function mN(t){return new t.constructor(t.type,t)}function gN(t){return"data"in t?new MessageEvent(t.type,t):"code"in t||"reason"in t?new s1(t.code||1999,t.reason||"unknown reason",t):"error"in t?new r1(t.error,t):new Event(t.type,t)}var Z0,yN=typeof process<"u"&&typeof((Z0=process.versions)==null?void 0:Z0.node)<"u"&&typeof document>"u",Il=yN?gN:mN,ds={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},Tv=!1,vN=class hs extends EventTarget{constructor(n,s,o={}){super();Me(this,"_ws");Me(this,"_retryCount",-1);Me(this,"_uptimeTimeout");Me(this,"_connectTimeout");Me(this,"_shouldReconnect",!0);Me(this,"_connectLock",!1);Me(this,"_binaryType","blob");Me(this,"_closeCalled",!1);Me(this,"_messageQueue",[]);Me(this,"_url");Me(this,"_protocols");Me(this,"_options");Me(this,"onclose",null);Me(this,"onerror",null);Me(this,"onmessage",null);Me(this,"onopen",null);Me(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:s=ds.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),s),pN(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(o=>{var l;return(l=this._ws)==null?void 0:l.send(o)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(Il(n))});Me(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(Il(n))});Me(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(Il(n)),this._connect()});Me(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(Il(n))});this._url=n,this._protocols=s,this._options=o,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return hs.CONNECTING}get OPEN(){return hs.OPEN}get CLOSING(){return hs.CLOSING}get CLOSED(){return hs.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((s,o)=>(typeof o=="string"?s+=o.length:o instanceof Blob?s+=o.size:s+=o.byteLength,s),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?hs.CLOSED:hs.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,s){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,s)}reconnect(n,s){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,s),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:s=ds.maxEnqueuedMessages}=this._options;this._messageQueue.length",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=ds.reconnectionDelayGrowFactor,minReconnectionDelay:s=ds.minReconnectionDelay,maxReconnectionDelay:o=ds.maxReconnectionDelay}=this._options;let l=0;return this._retryCount>0&&(l=s*Math.pow(n,this._retryCount-1),l>o&&(l=o)),this._debug("next delay",l),l}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const s=n();if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(s.then)return s}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const s=n();if(typeof s=="string")return Promise.resolve(s);if(s.then)return s}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:n=ds.maxRetries,connectionTimeout:s=ds.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([o,l])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Tv&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),Tv=!0);const u=this._options.WebSocket||WebSocket;this._debug("connect",{url:o,protocols:l}),this._ws=l?new u(o,l):new u(o),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),s)}).catch(o=>{this._connectLock=!1,this._handleError(new Md.ErrorEvent(Error(o.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new Md.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,s){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,s),this._handleClose(new Md.CloseEvent(n,s,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var xN=t=>t[1]!==null&&t[1]!==void 0;function wN(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let t=new Date().getTime(),e=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let s=Math.random()*16;return t>0?(s=(t+s)%16|0,t=Math.floor(t/16)):(s=(e+s)%16|0,e=Math.floor(e/16)),(n==="x"?s:s&3|8).toString(16)})}function i1(t,e,n={}){const{host:s,path:o,protocol:l,room:u,party:d,query:f}=t;let p=s.replace(/^(http|https|ws|wss):\/\//,"");if(p.endsWith("/")&&(p=p.slice(0,-1)),o&&o.startsWith("/"))throw new Error("path must not start with a slash");const g=d??"main",v=o?`/${o}`:"",w=l||(p.startsWith("localhost:")||p.startsWith("127.0.0.1:")||p.startsWith("192.168.")||p.startsWith("10.")||p.startsWith("172.")&&p.split(".")[1]>="16"&&p.split(".")[1]<="31"||p.startsWith("[::ffff:7f00:1]:")?e:e+"s"),T=`${w}://${p}/${d?`parties/${d}`:"party"}/${u}${v}`,R=(S={})=>`${T}?${new URLSearchParams([...Object.entries(n),...Object.entries(S).filter(xN)])}`,b=typeof f=="function"?async()=>R(await f()):R(f);return{host:p,path:v,room:u,name:g,protocol:w,partyUrl:T,urlProvider:b}}var SN=class extends vN{constructor(e){const n=_v(e);super(n.urlProvider,n.protocols,n.socketOptions);Me(this,"_pk");Me(this,"_pkurl");Me(this,"name");Me(this,"room");Me(this,"host");Me(this,"path");this.partySocketOptions=e,this.setWSProperties(n)}updateProperties(e){const n=_v({...e,host:e.host??this.host,room:e.room??this.room,path:e.path??this.path});this._url=n.urlProvider,this._protocols=n.protocols,this._options=n.socketOptions,this.setWSProperties(n)}setWSProperties(e){const{_pk:n,_pkurl:s,name:o,room:l,host:u,path:d}=e;this._pk=n,this._pkurl=s,this.name=o,this.room=l,this.host=u,this.path=d}reconnect(e,n){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(e,n)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(e,n){const s=i1(e,"http"),o=typeof s.urlProvider=="string"?s.urlProvider:await s.urlProvider();return(e.fetch??fetch)(o,n)}};function _v(t){const{id:e,host:n,path:s,party:o,room:l,protocol:u,query:d,protocols:f,...p}=t,g=e||wN(),v=i1(t,"ws",{_pk:g});return{_pk:g,_pkurl:v.partyUrl,name:v.name,room:v.room,host:v.host,path:v.path,protocols:f,socketOptions:p,urlProvider:v.urlProvider}}const EN=1e3,bN=3e3;class TN{constructor(e,n,s,o,l){var u;this.onClose=l,this.listeners=new Set,this.heartbeat=null,this.id=(u=o==null?void 0:o.id)!==null&&u!==void 0?u:crypto.randomUUID();const d=new SN({host:s.host,party:e,room:n,id:this.id,query:()=>{const g=s.getAuthToken();return{app_id:s.appId,handler:e,...g?{token:g}:{},...s.functionsVersion?{fv:s.functionsVersion}:{}}}});this.ws=d;let f=Date.now();const p=()=>{f=Date.now()};d.addEventListener("open",p),d.addEventListener("message",g=>{p();let v;try{v=JSON.parse(g.data)}catch{return}if((v&&typeof v=="object"?v.type:void 0)!=="__pong")for(const T of this.listeners)T(v)}),this.heartbeat=setInterval(()=>{if(Date.now()-f>bN){p(),d.reconnect();return}try{d.send(JSON.stringify({type:"__ping"}))}catch{}},EN)}subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}send(e){this.ws.send(JSON.stringify(e))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function _N(t,e,n,s){let o=null;return{connect(l){if(o)return o;const u=new TN(t,e,n,l,()=>{s.delete(u),o===u&&(o=null)});return o=u,s.add(u),u}}}function CN(t,e){return t&&!t.startsWith("/")?t:e??t}function PN(t){const e=new Set;return{module:new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"))return l=>_N(o,l,t,e)}}),closeAll:()=>{for(const s of[...e])s.close()}}}function RN(t){var e,n,s;const{serverUrl:o="https://base44.app",appId:l,token:u,serviceToken:d,requiresAuth:f=!1,appBaseUrl:p,options:g,functionsVersion:v,headers:w}=t,T=typeof p=="string"?p:"",R={serverUrl:o,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:l,token:u};let b=null;const S=()=>(b||(b=hN({config:R})),b),E={...w,"X-App-Id":String(l)},k=v?{...E,"Base44-Functions-Version":v}:E,P=Oo({baseURL:`${o}/api`,headers:E,token:u,onError:g==null?void 0:g.onError}),A=Oo({baseURL:`${o}/api`,headers:k,token:u,interceptResponses:!1,onError:g==null?void 0:g.onError}),F={...E,...u?{"on-behalf-of":`Bearer ${u}`}:{}},B=Oo({baseURL:`${o}/api`,headers:F,token:d,onError:g==null?void 0:g.onError}),q=Oo({baseURL:`${o}/api`,headers:k,token:d,interceptResponses:!1}),U=hA(P,A,l,{appBaseUrl:T});if(typeof window<"u"){const Ee=u||ks();Ee&&U.setToken(Ee)}const Y=PN({appId:l,host:CN(o,typeof window<"u"?(e=window.location)===null||e===void 0?void 0:e.origin:void 0),functionsVersion:v,getAuthToken:()=>u||ks()}),ne={entities:fv({axios:P,appId:l,getSocket:S}),integrations:hv(P,l),connectors:gA(P,l),auth:U,functions:pv(A,l,{getAuthHeaders:()=>{const Ee={},Z=u||ks();return Z&&(Ee.Authorization=`Bearer ${Z}`),Ee},baseURL:(n=A.defaults)===null||n===void 0?void 0:n.baseURL}),agents:mv({axios:P,getSocket:S,appId:l,serverUrl:o,token:u}),aiGateway:gv({serverUrl:o,token:u,appId:l}),appLogs:yv(P,l),users:vA(P,l),analytics:Zk({axiosClient:P,serverUrl:o,appId:l,userAuthModule:U}),actors:Y.module,cleanup:()=>{ne.analytics.cleanup(),Y.closeAll(),b&&b.disconnect()}},xe={entities:fv({axios:B,appId:l,getSocket:S}),integrations:hv(B,l),sso:pA(B,l),connectors:mA(B,l),functions:pv(q,l,{getAuthHeaders:()=>{const Ee={};return d&&(Ee.Authorization=`Bearer ${d}`),Ee},baseURL:(s=q.defaults)===null||s===void 0?void 0:s.baseURL}),agents:mv({axios:B,getSocket:S,appId:l,serverUrl:o,token:u}),aiGateway:gv({serverUrl:o,token:d,appId:l}),appLogs:yv(B,l),cleanup:()=>{b&&b.disconnect()}};return f&&typeof window<"u"&&setTimeout(async()=>{try{await ne.auth.isAuthenticated()||ne.auth.redirectToLogin(window.location.href)}catch(Ee){console.error("Authentication check failed:",Ee),ne.auth.redirectToLogin(window.location.href)}},0),{...ne,setToken(Ee){ne.auth.setToken(Ee),b&&b.updateConfig({token:Ee}),R.token=Ee},getConfig(){return{serverUrl:o,appId:l,requiresAuth:f}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return xe}}}const o1=typeof window>"u",kN=o1?{localStorage:new Map}:window,Vo=kN.localStorage,AN=t=>t.replace(/([A-Z])/g,"_$1").toLowerCase(),ci=(t,{defaultValue:e=void 0,removeFromUrl:n=!1}={})=>{if(o1)return e;const s=`base44_${AN(t)}`,o=new URLSearchParams(window.location.search),l=o.get(t);if(n){o.delete(t);const d=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}if(l)return Vo.setItem(s,l),l;if(e)return Vo.setItem(s,e),e;const u=Vo.getItem(s);return u||null},NN=()=>(ci("clear_access_token")==="true"&&(Vo.removeItem("base44_access_token"),Vo.removeItem("token")),{appId:ci("app_id",{defaultValue:"6a7a05939fa1d342611ac45e"}),token:ci("access_token",{removeFromUrl:!0}),fromUrl:ci("from_url",{defaultValue:window.location.href}),functionsVersion:ci("functions_version",{defaultValue:"prod"}),appBaseUrl:ci("app_base_url",{defaultValue:void 0})}),Do={...NN()},{appId:ON,token:jN,functionsVersion:DN,appBaseUrl:LN}=Do,Lo=RN({appId:ON,token:jN,functionsVersion:DN,serverUrl:"",requiresAuth:!1,appBaseUrl:LN});function MN({}){var o;const e=Qr().pathname.substring(1),{data:n,isFetched:s}=DC({queryKey:["user"],queryFn:async()=>{try{return{user:await Lo.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return y.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:y.jsx("div",{className:"max-w-md w-full",children:y.jsxs("div",{className:"text-center space-y-6",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),y.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),y.jsxs("div",{className:"space-y-3",children:[y.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),y.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",y.jsxs("span",{className:"font-medium text-slate-700",children:['"',e,'"']})," could not be found in this application."]})]}),s&&n.isAuthenticated&&((o=n.user)==null?void 0:o.role)==="admin"&&y.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:y.jsxs("div",{className:"flex items-start space-x-3",children:[y.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:y.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),y.jsxs("div",{className:"text-left space-y-1",children:[y.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),y.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),y.jsx("div",{className:"pt-6",children:y.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[y.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const a1=_.createContext(),IN=({children:t})=>{const[e,n]=_.useState(null),[s,o]=_.useState(!1),[l,u]=_.useState(!0),[d,f]=_.useState(!0),[p,g]=_.useState(null),[v,w]=_.useState(!1),[T,R]=_.useState(null);_.useEffect(()=>{b()},[]);const b=async()=>{var P,A;try{f(!0),g(null);const F=Oo({baseURL:"/api/apps/public",headers:{"X-App-Id":Do.appId},token:Do.token,interceptResponses:!0});try{const B=await F.get(`/prod/public-settings/by-id/${Do.appId}`);R(B),Do.token?await S():(u(!1),o(!1),w(!0)),f(!1)}catch(B){if(console.error("App state check failed:",B),B.status===403&&((A=(P=B.data)==null?void 0:P.extra_data)!=null&&A.reason)){const q=B.data.extra_data.reason;g(q==="auth_required"?{type:"auth_required",message:"Authentication required"}:q==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:q,message:B.message})}else g({type:"unknown",message:B.message||"Failed to load app"});f(!1),u(!1)}}catch(F){console.error("Unexpected error:",F),g({type:"unknown",message:F.message||"An unexpected error occurred"}),f(!1),u(!1)}},S=async()=>{try{u(!0);const P=await Lo.auth.me();n(P),o(!0),u(!1),w(!0)}catch(P){console.error("User auth check failed:",P),u(!1),o(!1),w(!0),(P.status===401||P.status===403)&&g({type:"auth_required",message:"Authentication required"})}},E=(P=!0)=>{n(null),o(!1),P?Lo.auth.logout(window.location.href):Lo.auth.logout()},k=()=>{Lo.auth.redirectToLogin(window.location.href)};return y.jsx(a1.Provider,{value:{user:e,isAuthenticated:s,isLoadingAuth:l,isLoadingPublicSettings:d,authError:p,appPublicSettings:T,authChecked:v,logout:E,navigateToLogin:k,checkUserAuth:S,checkAppState:b},children:t})},FN=()=>{const t=_.useContext(a1);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},UN=()=>y.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:y.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:y.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),y.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),y.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),y.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[y.jsx("p",{children:"If you believe this is an error, you can:"}),y.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[y.jsx("li",{children:"Verify you are logged in with the correct account"}),y.jsx("li",{children:"Contact the app administrator for access"}),y.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),VN=t=>{const e=t.slice(1);try{return decodeURIComponent(e)}catch{return e}};function BN(){const{pathname:t,hash:e}=Qr(),n=dP();return _.useEffect(()=>{if(n!=="POP"){if(e){const s=VN(e),o=window.setTimeout(()=>{var l;(l=document.getElementById(s))==null||l.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(o)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[t,e,n]),null}function zN(){return y.jsx("header",{className:"bg-[#F4F2ED] border-b border-[#202020]/10",children:y.jsxs("div",{className:"mx-auto max-w-[1440px] px-5 sm:px-10 lg:px-[60px] xl:px-[80px] h-[72px] flex items-center justify-between",children:[y.jsxs(dn,{to:"/",className:"flex items-baseline gap-2",children:[y.jsx("span",{className:"font-display text-[22px] tracking-[-0.01em] text-[#202020]",children:"Alrazah"}),y.jsx("span",{className:"text-[10px] uppercase tracking-[0.2em] text-[#202020]/50",children:"Holding"})]}),y.jsxs("nav",{className:"hidden md:flex items-center gap-8 text-[12px] uppercase tracking-[0.12em] text-[#202020]/70",children:[y.jsx(dn,{to:"/",className:"hover:text-[#6E1830] transition-colors",children:"Our Business"}),y.jsx(dn,{to:"/",className:"hover:text-[#6E1830] transition-colors",children:"Our Approach"}),y.jsx(dn,{to:"/",className:"hover:text-[#6E1830] transition-colors",children:"Contact"})]})]})})}const $N=[{label:"Overview",to:"/"},{label:"Real Estate",active:!0},{label:"Logistics & Industrial",to:"/"},{label:"Asset Management",href:"#asset-management"},{label:"Project Management",href:"#development-delivery"}];function WN(){return y.jsx("div",{className:"sticky top-0 z-30 bg-[#DDD9D0] border-b border-[#202020]/10",children:y.jsx("div",{className:"mx-auto max-w-[1440px] px-5 sm:px-10 lg:px-[60px] xl:px-[80px]",children:y.jsxs("div",{className:"h-[46px] flex items-center gap-7 overflow-x-auto no-scrollbar",children:[y.jsx("span",{className:"text-[10px] uppercase tracking-[0.16em] text-[#202020]/45 shrink-0",children:"Our Business"}),$N.map(t=>{const e="relative h-[46px] flex items-center shrink-0 text-[11px] uppercase tracking-[0.12em]";if(t.active)return y.jsx("span",{className:`${e} font-medium text-[#202020] after:absolute after:bottom-0 after:left-0 after:right-0 after:h-[2px] after:bg-[#6E1830]`,children:t.label},t.label);const n="text-[#202020]/55 hover:text-[#6E1830] transition-colors";return t.href?y.jsx("a",{href:t.href,className:`${e} ${n}`,children:t.label},t.label):y.jsx(dn,{to:t.to,className:`${e} ${n}`,children:t.label},t.label)})]})})})}function HN(t){const[e,n]=_.useState(null);return _.useLayoutEffect(()=>{const s=t.current;if(!s)return;const o=s.getBoundingClientRect();n({width:o.width,height:o.height});const l=new ResizeObserver(([u])=>{const{width:d,height:f}=u.contentRect;n({width:d,height:f})});return l.observe(s),()=>l.disconnect()},[t]),e}const qN={"media.base44.com":"/images/public/","static.wixstatic.com":"/media/"},KN=1024,Yn={OPTIMIZED:"optimized",ORIGINAL:"original",FALLBACK:"fallback"},QN=[1,2,3],GN=6e3;function XN(t){try{const e=new URL(t);if(e.protocol!=="https:"||e.username||e.password||e.port&&e.port!=="443")return null;const n=qN[e.hostname];if(!n)return null;const s=e.pathname.match(/^(.*)\/v1\/(?:fill|fit)\/[^/]+\/[^/]+$/i),o=s?s[1]:e.pathname,l=o.split("/").pop();return!o.startsWith(n)||!l||!/\.[a-z0-9]+$/i.test(l)||/\.svg$/i.test(l)?null:{baseUrl:`${e.origin}${o}`,filename:l}}catch{return null}}const Cv=t=>Math.min(Math.max(Math.round(t),1),GN),Pv=t=>Math.min(1,Math.max(0,t));function Of({baseUrl:t,filename:e},{width:n,height:s,crop:o,focalPoint:l,quality:u}){const d=[`w_${Cv(n)}`,`h_${Cv(s||n)}`];o&&d.push(l?`fp_${Pv(l.x).toFixed(2)}_${Pv(l.y).toFixed(2)}`:"al_c"),d.push(`q_${u}`,"usm_0.66_1.00_0.01","enc_webp","quality_auto");const f=/\.gif$/i.test(e)?e:e.replace(/\.[a-z0-9]+$/i,"")+".webp";return`${t}/v1/${o?"fill":"fit"}/${d.join(",")}/${f}`}function YN(t,e){return QN.map(n=>`${Of(t,{...e,width:e.width*n,height:e.height?e.height*n:void 0})} ${n}x`).join(", ")}function JN(t,e){return(e==null?void 0:e.baseUrl)||t}function ZN(t){return t===Yn.OPTIMIZED?Yn.ORIGINAL:Yn.FALLBACK}const Id="https://static.wixstatic.com/media/12d367_4f26ccd17f8f4e3a8958306ea08c2332~mv2.png",l1=_.forwardRef(({aspectRatio:t,className:e,style:n,children:s},o)=>y.jsx("span",{ref:o,className:Hr("inline-block relative",e),style:{aspectRatio:t,...n},children:s}));l1.displayName="ImageWrapper";const u1=_.forwardRef(({parsed:t,fittingType:e,focalPoint:n,quality:s,className:o,style:l,aspectRatio:u,onLoad:d,...f},p)=>{const g=_.useRef(null),v=_.useRef(null),w=HN(g),[T,R]=_.useState(!1);_.useImperativeHandle(p,()=>v.current),_.useEffect(()=>{R(!1)},[t.baseUrl]);const b=e!=="fit",S=w&&{width:w.width||KN,height:w.height?w.height:void 0,crop:b,focalPoint:b?n:void 0,quality:s};return y.jsxs(l1,{ref:g,aspectRatio:u,className:o,style:l,children:[S&&!T&&y.jsx("img",{src:Of(t,{...S,width:20,height:S.height?Math.max(1,Math.round(20*S.height/S.width)):void 0,quality:20}),alt:"","aria-hidden":"true",className:"w-full h-full inset-0 absolute",style:{objectFit:e==="fit"?"contain":"cover",filter:"blur(10px)",transform:"scale(1.1)"}}),S&&y.jsx("img",{ref:v,src:Of(t,S),srcSet:YN(t,S),loading:"lazy",className:Hr("w-full h-full inset-0 absolute",e==="fit"?"object-contain":"object-cover"),onLoad:E=>{R(!0),d==null||d(E)},...f})]})});u1.displayName="ResponsiveImage";const Gr=_.forwardRef(({src:t,fittingType:e="fill",originWidth:n,originHeight:s,focalPointX:o,focalPointY:l,quality:u=90,onError:d,...f},p)=>{const g=t&&t!==Id?XN(t):null,v=g?Yn.OPTIMIZED:Yn.ORIGINAL,[w,T]=_.useState({src:t,mode:v}),R=w.src===t?w.mode:v;_.useEffect(()=>{T({src:t,mode:v})},[t,v]);const S={...f,onError:A=>{if(R===Yn.FALLBACK)return;const F=ZN(R);T({src:t,mode:F}),F===Yn.FALLBACK&&(d==null||d(A))}};if(!t)return y.jsx("img",{ref:p,src:Id,...S,"data-empty-image":!0});const E=R===Yn.OPTIMIZED?g:null;if(!E){const A=R===Yn.FALLBACK,F=A?Id:JN(t,g);return y.jsx("img",{ref:p,src:F,...S,"data-error-image":A||void 0})}const k=typeof o=="number"&&typeof l=="number"?{x:o,y:l}:void 0,P=n&&s?`${n} / ${s}`:void 0;return y.jsx(u1,{ref:p,parsed:E,fittingType:e,focalPoint:k,quality:u,aspectRatio:P,...S})});Gr.displayName="Image";const c1=_.createContext({});function e2(t){const e=_.useRef(null);return e.current===null&&(e.current=t()),e.current}const kh=_.createContext(null),d1=_.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function t2(t=!0){const e=_.useContext(kh);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:o}=e,l=_.useId();_.useEffect(()=>{t&&o(l)},[t]);const u=_.useCallback(()=>t&&s&&s(l),[l,s,t]);return!n&&s?[!1,u]:[!0]}const Ah=typeof window<"u",n2=Ah?_.useLayoutEffect:_.useEffect,Qt=t=>t;let f1=Qt;function Nh(t){let e;return()=>(e===void 0&&(e=t()),e)}const Ai=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},tr=t=>t*1e3,nr=t=>t/1e3,r2={useManualTiming:!1};function s2(t){let e=new Set,n=new Set,s=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(p){l.has(p)&&(f.schedule(p),t()),p(u)}const f={schedule:(p,g=!1,v=!1)=>{const T=v&&s?e:n;return g&&l.add(p),T.has(p)||T.add(p),p},cancel:p=>{n.delete(p),l.delete(p)},process:p=>{if(u=p,s){o=!0;return}s=!0,[e,n]=[n,e],e.forEach(d),e.clear(),s=!1,o&&(o=!1,f.process(p))}};return f}const Fl=["read","resolveKeyframes","update","preRender","render","postRender"],i2=40;function h1(t,e){let n=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,u=Fl.reduce((E,k)=>(E[k]=s2(l),E),{}),{read:d,resolveKeyframes:f,update:p,preRender:g,render:v,postRender:w}=u,T=()=>{const E=performance.now();n=!1,o.delta=s?1e3/60:Math.max(Math.min(E-o.timestamp,i2),1),o.timestamp=E,o.isProcessing=!0,d.process(o),f.process(o),p.process(o),g.process(o),v.process(o),w.process(o),o.isProcessing=!1,n&&e&&(s=!1,t(T))},R=()=>{n=!0,s=!0,o.isProcessing||t(T)};return{schedule:Fl.reduce((E,k)=>{const P=u[k];return E[k]=(A,F=!1,B=!1)=>(n||R(),P.schedule(A,F,B)),E},{}),cancel:E=>{for(let k=0;kRv[t].some(n=>!!e[n])};function o2(t){for(const e in t)Ni[e]={...Ni[e],...t[e]}}const a2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function au(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||a2.has(t)}let m1=t=>!au(t);function l2(t){t&&(m1=e=>e.startsWith("on")?!au(e):t(e))}try{l2(require("@emotion/is-prop-valid").default)}catch{}function u2(t,e,n){const s={};for(const o in t)o==="values"&&typeof t.values=="object"||(m1(o)||n===!0&&au(o)||!e&&!au(o)||t.draggable&&o.startsWith("onDrag"))&&(s[o]=t[o]);return s}function c2(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,o)=>o==="create"?t:(e.has(o)||e.set(o,t(o)),e.get(o))})}const Su=_.createContext({});function Yo(t){return typeof t=="string"||Array.isArray(t)}function Eu(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Oh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jh=["initial",...Oh];function bu(t){return Eu(t.animate)||jh.some(e=>Yo(t[e]))}function g1(t){return!!(bu(t)||t.variants)}function d2(t,e){if(bu(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Yo(n)?n:void 0,animate:Yo(s)?s:void 0}}return t.inherit!==!1?e:{}}function f2(t){const{initial:e,animate:n}=d2(t,_.useContext(Su));return _.useMemo(()=>({initial:e,animate:n}),[kv(e),kv(n)])}function kv(t){return Array.isArray(t)?t.join(" "):t}const h2=Symbol.for("motionComponentSymbol");function di(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function p2(t,e,n){return _.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):di(n)&&(n.current=s))},[e])}const Dh=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),m2="framerAppearId",y1="data-"+Dh(m2),{schedule:Lh}=h1(queueMicrotask,!1),v1=_.createContext({});function g2(t,e,n,s,o){var l,u;const{visualElement:d}=_.useContext(Su),f=_.useContext(p1),p=_.useContext(kh),g=_.useContext(d1).reducedMotion,v=_.useRef(null);s=s||f.renderer,!v.current&&s&&(v.current=s(t,{visualState:e,parent:d,props:n,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g}));const w=v.current,T=_.useContext(v1);w&&!w.projection&&o&&(w.type==="html"||w.type==="svg")&&y2(v.current,n,o,T);const R=_.useRef(!1);_.useInsertionEffect(()=>{w&&R.current&&w.update(n,p)});const b=n[y1],S=_.useRef(!!b&&!(!((l=window.MotionHandoffIsComplete)===null||l===void 0)&&l.call(window,b))&&((u=window.MotionHasOptimisedAnimation)===null||u===void 0?void 0:u.call(window,b)));return n2(()=>{w&&(R.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),Lh.render(w.render),S.current&&w.animationState&&w.animationState.animateChanges())}),_.useEffect(()=>{w&&(!S.current&&w.animationState&&w.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)===null||E===void 0||E.call(window,b)}),S.current=!1))}),w}function y2(t,e,n,s){const{layoutId:o,layout:l,drag:u,dragConstraints:d,layoutScroll:f,layoutRoot:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:x1(t.parent)),t.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!u||d&&di(d),visualElement:t,animationType:typeof l=="string"?l:"both",initialPromotionConfig:s,layoutScroll:f,layoutRoot:p})}function x1(t){if(t)return t.options.allowProjection!==!1?t.projection:x1(t.parent)}function v2({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:o}){var l,u;t&&o2(t);function d(p,g){let v;const w={..._.useContext(d1),...p,layoutId:x2(p)},{isStatic:T}=w,R=f2(p),b=s(p,T);if(!T&&Ah){w2();const S=S2(w);v=S.MeasureLayout,R.visualElement=g2(o,b,w,e,S.ProjectionNode)}return y.jsxs(Su.Provider,{value:R,children:[v&&R.visualElement?y.jsx(v,{visualElement:R.visualElement,...w}):null,n(o,p,p2(b,R.visualElement,g),b,T,R.visualElement)]})}d.displayName=`motion.${typeof o=="string"?o:`create(${(u=(l=o.displayName)!==null&&l!==void 0?l:o.name)!==null&&u!==void 0?u:""})`}`;const f=_.forwardRef(d);return f[h2]=o,f}function x2({layoutId:t}){const e=_.useContext(c1).id;return e&&t!==void 0?e+"-"+t:t}function w2(t,e){_.useContext(p1).strict}function S2(t){const{drag:e,layout:n}=Ni;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const E2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Mh(t){return typeof t!="string"||t.includes("-")?!1:!!(E2.indexOf(t)>-1||/[A-Z]/u.test(t))}function Av(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ih(t,e,n,s){if(typeof e=="function"){const[o,l]=Av(s);e=e(n!==void 0?n:t.custom,o,l)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,l]=Av(s);e=e(n!==void 0?n:t.custom,o,l)}return e}const jf=t=>Array.isArray(t),b2=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),T2=t=>jf(t)?t[t.length-1]||0:t,Pt=t=>!!(t&&t.getVelocity);function Jl(t){const e=Pt(t)?t.get():t;return b2(e)?e.toValue():e}function _2({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,o,l){const u={latestValues:C2(s,o,l,t),renderState:e()};return n&&(u.onMount=d=>n({props:s,current:d,...u}),u.onUpdate=d=>n(d)),u}const w1=t=>(e,n)=>{const s=_.useContext(Su),o=_.useContext(kh),l=()=>_2(t,e,s,o);return n?l():e2(l)};function C2(t,e,n,s){const o={},l=s(t,{});for(const w in l)o[w]=Jl(l[w]);let{initial:u,animate:d}=t;const f=bu(t),p=g1(t);e&&p&&!f&&t.inherit!==!1&&(u===void 0&&(u=e.initial),d===void 0&&(d=e.animate));let g=n?n.initial===!1:!1;g=g||u===!1;const v=g?d:u;if(v&&typeof v!="boolean"&&!Eu(v)){const w=Array.isArray(v)?v:[v];for(let T=0;Te=>typeof e=="string"&&e.startsWith(t),E1=S1("--"),P2=S1("var(--"),Fh=t=>P2(t)?R2.test(t.split("/*")[0].trim()):!1,R2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,b1=(t,e)=>e&&typeof t=="number"?e.transform(t):t,rr=(t,e,n)=>n>e?e:ntypeof t=="number",parse:parseFloat,transform:t=>t},Jo={...Ui,transform:t=>rr(0,1,t)},Ul={...Ui,default:1},pa=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),kr=pa("deg"),Mn=pa("%"),ve=pa("px"),k2=pa("vh"),A2=pa("vw"),Nv={...Mn,parse:t=>Mn.parse(t)/100,transform:t=>Mn.transform(t*100)},N2={borderWidth:ve,borderTopWidth:ve,borderRightWidth:ve,borderBottomWidth:ve,borderLeftWidth:ve,borderRadius:ve,radius:ve,borderTopLeftRadius:ve,borderTopRightRadius:ve,borderBottomRightRadius:ve,borderBottomLeftRadius:ve,width:ve,maxWidth:ve,height:ve,maxHeight:ve,top:ve,right:ve,bottom:ve,left:ve,padding:ve,paddingTop:ve,paddingRight:ve,paddingBottom:ve,paddingLeft:ve,margin:ve,marginTop:ve,marginRight:ve,marginBottom:ve,marginLeft:ve,backgroundPositionX:ve,backgroundPositionY:ve},O2={rotate:kr,rotateX:kr,rotateY:kr,rotateZ:kr,scale:Ul,scaleX:Ul,scaleY:Ul,scaleZ:Ul,skew:kr,skewX:kr,skewY:kr,distance:ve,translateX:ve,translateY:ve,translateZ:ve,x:ve,y:ve,z:ve,perspective:ve,transformPerspective:ve,opacity:Jo,originX:Nv,originY:Nv,originZ:ve},Ov={...Ui,transform:Math.round},Uh={...N2,...O2,zIndex:Ov,size:ve,fillOpacity:Jo,strokeOpacity:Jo,numOctaves:Ov},j2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},D2=Fi.length;function L2(t,e,n){let s="",o=!0;for(let l=0;l({style:{},transform:{},transformOrigin:{},vars:{}}),T1=()=>({...zh(),attrs:{}}),$h=t=>typeof t=="string"&&t.toLowerCase()==="svg";function _1(t,{style:e,vars:n},s,o){Object.assign(t.style,e,o&&o.getProjectionStyles(s));for(const l in n)t.style.setProperty(l,n[l])}const C1=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function P1(t,e,n,s){_1(t,e,void 0,s);for(const o in e.attrs)t.setAttribute(C1.has(o)?o:Dh(o),e.attrs[o])}const lu={};function V2(t){Object.assign(lu,t)}function R1(t,{layout:e,layoutId:n}){return Fs.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!lu[t]||t==="opacity")}function Wh(t,e,n){var s;const{style:o}=t,l={};for(const u in o)(Pt(o[u])||e.style&&Pt(e.style[u])||R1(u,t)||((s=n==null?void 0:n.getValue(u))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(l[u]=o[u]);return l}function k1(t,e,n){const s=Wh(t,e,n);for(const o in t)if(Pt(t[o])||Pt(e[o])){const l=Fi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[l]=t[o]}return s}function B2(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const Dv=["x","y","width","height","cx","cy","r"],z2={useVisualState:w1({scrapeMotionValuesFromProps:k1,createRenderState:T1,onUpdate:({props:t,prevProps:e,current:n,renderState:s,latestValues:o})=>{if(!n)return;let l=!!t.drag;if(!l){for(const d in o)if(Fs.has(d)){l=!0;break}}if(!l)return;let u=!e;if(e)for(let d=0;d{B2(n,s),$e.render(()=>{Bh(s,o,$h(n.tagName),t.transformTemplate),P1(n,s)})})}})},$2={useVisualState:w1({scrapeMotionValuesFromProps:Wh,createRenderState:zh})};function A1(t,e,n){for(const s in e)!Pt(e[s])&&!R1(s,n)&&(t[s]=e[s])}function W2({transformTemplate:t},e){return _.useMemo(()=>{const n=zh();return Vh(n,e,t),Object.assign({},n.vars,n.style)},[e])}function H2(t,e){const n=t.style||{},s={};return A1(s,n,t),Object.assign(s,W2(t,e)),s}function q2(t,e){const n={},s=H2(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}function K2(t,e,n,s){const o=_.useMemo(()=>{const l=T1();return Bh(l,e,$h(s),t.transformTemplate),{...l.attrs,style:{...l.style}}},[e]);if(t.style){const l={};A1(l,t.style,t),o.style={...l,...o.style}}return o}function Q2(t=!1){return(n,s,o,{latestValues:l},u)=>{const f=(Mh(n)?K2:q2)(s,l,u,n),p=u2(s,typeof n=="string",t),g=n!==_.Fragment?{...p,...f,ref:o}:{},{children:v}=s,w=_.useMemo(()=>Pt(v)?v.get():v,[v]);return _.createElement(n,{...g,children:w})}}function G2(t,e){return function(s,{forwardMotionProps:o}={forwardMotionProps:!1}){const u={...Mh(s)?z2:$2,preloadedFeatures:t,useRender:Q2(o),createVisualElement:e,Component:s};return v2(u)}}function N1(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;swindow.ScrollTimeline!==void 0);class Y2{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s{if(X2()&&o.attachTimeline)return o.attachTimeline(e);if(typeof n=="function")return n(o)});return()=>{s.forEach((o,l)=>{o&&o(),this.animations[l].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;nn[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class J2 extends Y2{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function Hh(t,e){return t?t[e]||t.default||t:void 0}const Df=2e4;function O1(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e=Df?1/0:e}function qh(t){return typeof t=="function"}function Lv(t,e){t.timeline=e,t.onfinish=null}const Kh=t=>Array.isArray(t)&&typeof t[0]=="number",Z2={linearEasing:void 0};function eO(t,e){const n=Nh(t);return()=>{var s;return(s=Z2[e])!==null&&s!==void 0?s:n()}}const uu=eO(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),j1=(t,e,n=10)=>{let s="";const o=Math.max(Math.round(e/n),2);for(let l=0;l`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Lf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mo([0,.65,.55,1]),circOut:Mo([.55,0,1,.45]),backIn:Mo([.31,.01,.66,-.59]),backOut:Mo([.33,1.53,.69,.99])};function L1(t,e){if(t)return typeof t=="function"&&uu()?j1(t,e):Kh(t)?Mo(t):Array.isArray(t)?t.map(n=>L1(n,e)||Lf.easeOut):Lf[t]}const En={x:!1,y:!1};function M1(){return En.x||En.y}function tO(t,e,n){var s;if(t instanceof Element)return[t];if(typeof t=="string"){let o=document;const l=(s=void 0)!==null&&s!==void 0?s:o.querySelectorAll(t);return l?Array.from(l):[]}return Array.from(t)}function I1(t,e){const n=tO(t),s=new AbortController,o={passive:!0,...e,signal:s.signal};return[n,o,()=>s.abort()]}function Mv(t){return e=>{e.pointerType==="touch"||M1()||t(e)}}function nO(t,e,n={}){const[s,o,l]=I1(t,n),u=Mv(d=>{const{target:f}=d,p=e(d);if(typeof p!="function"||!f)return;const g=Mv(v=>{p(v),f.removeEventListener("pointerleave",g)});f.addEventListener("pointerleave",g,o)});return s.forEach(d=>{d.addEventListener("pointerenter",u,o)}),l}const F1=(t,e)=>e?t===e?!0:F1(t,e.parentElement):!1,Qh=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,rO=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sO(t){return rO.has(t.tagName)||t.tabIndex!==-1}const Io=new WeakSet;function Iv(t){return e=>{e.key==="Enter"&&t(e)}}function Ud(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const iO=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Iv(()=>{if(Io.has(n))return;Ud(n,"down");const o=Iv(()=>{Ud(n,"up")}),l=()=>Ud(n,"cancel");n.addEventListener("keyup",o,e),n.addEventListener("blur",l,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Fv(t){return Qh(t)&&!M1()}function oO(t,e,n={}){const[s,o,l]=I1(t,n),u=d=>{const f=d.currentTarget;if(!Fv(d)||Io.has(f))return;Io.add(f);const p=e(d),g=(T,R)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",w),!(!Fv(T)||!Io.has(f))&&(Io.delete(f),typeof p=="function"&&p(T,{success:R}))},v=T=>{g(T,n.useGlobalTarget||F1(f,T.target))},w=T=>{g(T,!1)};window.addEventListener("pointerup",v,o),window.addEventListener("pointercancel",w,o)};return s.forEach(d=>{!sO(d)&&d.getAttribute("tabindex")===null&&(d.tabIndex=0),(n.useGlobalTarget?window:d).addEventListener("pointerdown",u,o),d.addEventListener("focus",p=>iO(p,o),o)}),l}function aO(t){return t==="x"||t==="y"?En[t]?null:(En[t]=!0,()=>{En[t]=!1}):En.x||En.y?null:(En.x=En.y=!0,()=>{En.x=En.y=!1})}const U1=new Set(["width","height","top","left","right","bottom",...Fi]);let Zl;function lO(){Zl=void 0}const In={now:()=>(Zl===void 0&&In.set(yt.isProcessing||r2.useManualTiming?yt.timestamp:performance.now()),Zl),set:t=>{Zl=t,queueMicrotask(lO)}};function Gh(t,e){t.indexOf(e)===-1&&t.push(e)}function Xh(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Yh{constructor(){this.subscriptions=[]}add(e){return Gh(this.subscriptions,e),()=>Xh(this.subscriptions,e)}notify(e,n,s){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,s);else for(let l=0;l!isNaN(parseFloat(t));class cO{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,o=!0)=>{const l=In.now();this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=In.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=uO(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Yh);const s=this.events[e].add(n);return e==="change"?()=>{s(),$e.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=In.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Uv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Uv);return V1(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zo(t,e){return new cO(t,e)}function dO(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Zo(n))}function fO(t,e){const n=Tu(t,e);let{transitionEnd:s={},transition:o={},...l}=n||{};l={...l,...s};for(const u in l){const d=T2(l[u]);dO(t,u,d)}}function hO(t){return!!(Pt(t)&&t.add)}function Mf(t,e){const n=t.getValue("willChange");if(hO(n))return n.add(e)}function B1(t){return t.props[y1]}const z1=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,pO=1e-7,mO=12;function gO(t,e,n,s,o){let l,u,d=0;do u=e+(n-e)/2,l=z1(u,s,o)-t,l>0?n=u:e=u;while(Math.abs(l)>pO&&++dgO(l,0,1,t,n);return l=>l===0||l===1?l:z1(o(l),e,s)}const $1=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,W1=t=>e=>1-t(1-e),H1=ma(.33,1.53,.69,.99),Jh=W1(H1),q1=$1(Jh),K1=t=>(t*=2)<1?.5*Jh(t):.5*(2-Math.pow(2,-10*(t-1))),Zh=t=>1-Math.sin(Math.acos(t)),Q1=W1(Zh),G1=$1(Zh),X1=t=>/^0[^.\s]+$/u.test(t);function yO(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||X1(t):!0}const Bo=t=>Math.round(t*1e5)/1e5,ep=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function vO(t){return t==null}const xO=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tp=(t,e)=>n=>!!(typeof n=="string"&&xO.test(n)&&n.startsWith(t)||e&&!vO(n)&&Object.prototype.hasOwnProperty.call(n,e)),Y1=(t,e,n)=>s=>{if(typeof s!="string")return s;const[o,l,u,d]=s.match(ep);return{[t]:parseFloat(o),[e]:parseFloat(l),[n]:parseFloat(u),alpha:d!==void 0?parseFloat(d):1}},wO=t=>rr(0,255,t),Vd={...Ui,transform:t=>Math.round(wO(t))},vs={test:tp("rgb","red"),parse:Y1("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Vd.transform(t)+", "+Vd.transform(e)+", "+Vd.transform(n)+", "+Bo(Jo.transform(s))+")"};function SO(t){let e="",n="",s="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,s+=s,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}const If={test:tp("#"),parse:SO,transform:vs.transform},fi={test:tp("hsl","hue"),parse:Y1("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Mn.transform(Bo(e))+", "+Mn.transform(Bo(n))+", "+Bo(Jo.transform(s))+")"},Ct={test:t=>vs.test(t)||If.test(t)||fi.test(t),parse:t=>vs.test(t)?vs.parse(t):fi.test(t)?fi.parse(t):If.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?vs.transform(t):fi.transform(t)},EO=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function bO(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ep))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(EO))===null||n===void 0?void 0:n.length)||0)>0}const J1="number",Z1="color",TO="var",_O="var(",Vv="${}",CO=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ea(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},o=[];let l=0;const d=e.replace(CO,f=>(Ct.test(f)?(s.color.push(l),o.push(Z1),n.push(Ct.parse(f))):f.startsWith(_O)?(s.var.push(l),o.push(TO),n.push(f)):(s.number.push(l),o.push(J1),n.push(parseFloat(f))),++l,Vv)).split(Vv);return{values:n,split:d,indexes:s,types:o}}function eS(t){return ea(t).values}function tS(t){const{split:e,types:n}=ea(t),s=e.length;return o=>{let l="";for(let u=0;utypeof t=="number"?0:t;function RO(t){const e=eS(t);return tS(t)(e.map(PO))}const $r={test:bO,parse:eS,createTransformer:tS,getAnimatableNone:RO},kO=new Set(["brightness","contrast","saturate","opacity"]);function AO(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ep)||[];if(!s)return t;const o=n.replace(s,"");let l=kO.has(e)?1:0;return s!==n&&(l*=100),e+"("+l+o+")"}const NO=/\b([a-z-]*)\(.*?\)/gu,Ff={...$r,getAnimatableNone:t=>{const e=t.match(NO);return e?e.map(AO).join(" "):t}},OO={...Uh,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:Ff,WebkitFilter:Ff},np=t=>OO[t];function nS(t,e){let n=np(t);return n!==Ff&&(n=$r),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const jO=new Set(["auto","none","0"]);function DO(t,e,n){let s=0,o;for(;st===Ui||t===ve,zv=(t,e)=>parseFloat(t.split(", ")[e]),$v=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const o=s.match(/^matrix3d\((.+)\)$/u);if(o)return zv(o[1],e);{const l=s.match(/^matrix\((.+)\)$/u);return l?zv(l[1],t):0}},LO=new Set(["x","y","z"]),MO=Fi.filter(t=>!LO.has(t));function IO(t){const e=[];return MO.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Oi={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:$v(4,13),y:$v(5,14)};Oi.translateX=Oi.x;Oi.translateY=Oi.y;const As=new Set;let Uf=!1,Vf=!1;function rS(){if(Vf){const t=Array.from(As).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const o=IO(s);o.length&&(n.set(s,o),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const o=n.get(s);o&&o.forEach(([l,u])=>{var d;(d=s.getValue(l))===null||d===void 0||d.set(u)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Vf=!1,Uf=!1,As.forEach(t=>t.complete()),As.clear()}function sS(){As.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Vf=!0)})}function FO(){sS(),rS()}class rp{constructor(e,n,s,o,l,u=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=o,this.element=l,this.isAsync=u}scheduleResolve(){this.isScheduled=!0,this.isAsync?(As.add(this),Uf||(Uf=!0,$e.read(sS),$e.resolveKeyframes(rS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:o}=this;for(let l=0;l/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),UO=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function VO(t){const e=UO.exec(t);if(!e)return[,];const[,n,s,o]=e;return[`--${n??s}`,o]}function oS(t,e,n=1){const[s,o]=VO(t);if(!s)return;const l=window.getComputedStyle(e).getPropertyValue(s);if(l){const u=l.trim();return iS(u)?parseFloat(u):u}return Fh(o)?oS(o,e,n+1):o}const aS=t=>e=>e.test(t),BO={test:t=>t==="auto",parse:t=>t},lS=[Ui,ve,Mn,kr,A2,k2,BO],Wv=t=>lS.find(aS(t));class uS extends rp{constructor(e,n,s,o,l){super(e,n,s,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let f=0;f{n.getValue(f).set(p)}),this.resolveNoneKeyframes()}}const Hv=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&($r.test(t)||t==="0")&&!t.startsWith("url("));function zO(t){const e=t[0];if(t.length===1)return!0;for(let n=0;nt!==null;function _u(t,{repeat:e,repeatType:n="loop"},s){const o=t.filter(WO),l=e&&n!=="loop"&&e%2===1?0:o.length-1;return!l||s===void 0?o[l]:s}const HO=40;class cS{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:u="loop",...d}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=In.now(),this.options={autoplay:e,delay:n,type:s,repeat:o,repeatDelay:l,repeatType:u,...d},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>HO?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&FO(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=In.now(),this.hasAttemptedResolve=!0;const{name:s,type:o,velocity:l,delay:u,onComplete:d,onUpdate:f,isGenerator:p}=this.options;if(!p&&!$O(e,s,o,l))if(u)this.options.duration=0;else{f&&f(_u(e,this.options,n)),d&&d(),this.resolveFinishedPromise();return}const g=this.initPlayback(e,n);g!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...g},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const Ke=(t,e,n)=>t+(e-t)*n;function Bd(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function qO({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let o=0,l=0,u=0;if(!e)o=l=u=n;else{const d=n<.5?n*(1+e):n+e-n*e,f=2*n-d;o=Bd(f,d,t+1/3),l=Bd(f,d,t),u=Bd(f,d,t-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:s}}function cu(t,e){return n=>n>0?e:t}const zd=(t,e,n)=>{const s=t*t,o=n*(e*e-s)+s;return o<0?0:Math.sqrt(o)},KO=[If,vs,fi],QO=t=>KO.find(e=>e.test(t));function qv(t){const e=QO(t);if(!e)return!1;let n=e.parse(t);return e===fi&&(n=qO(n)),n}const Kv=(t,e)=>{const n=qv(t),s=qv(e);if(!n||!s)return cu(t,e);const o={...n};return l=>(o.red=zd(n.red,s.red,l),o.green=zd(n.green,s.green,l),o.blue=zd(n.blue,s.blue,l),o.alpha=Ke(n.alpha,s.alpha,l),vs.transform(o))},GO=(t,e)=>n=>e(t(n)),ga=(...t)=>t.reduce(GO),Bf=new Set(["none","hidden"]);function XO(t,e){return Bf.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function YO(t,e){return n=>Ke(t,e,n)}function sp(t){return typeof t=="number"?YO:typeof t=="string"?Fh(t)?cu:Ct.test(t)?Kv:ej:Array.isArray(t)?dS:typeof t=="object"?Ct.test(t)?Kv:JO:cu}function dS(t,e){const n=[...t],s=n.length,o=t.map((l,u)=>sp(l)(l,e[u]));return l=>{for(let u=0;u{for(const l in s)n[l]=s[l](o);return n}}function ZO(t,e){var n;const s=[],o={color:0,var:0,number:0};for(let l=0;l{const n=$r.createTransformer(e),s=ea(t),o=ea(e);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Bf.has(t)&&!o.values.length||Bf.has(e)&&!s.values.length?XO(t,e):ga(dS(ZO(s,o),o.values),n):cu(t,e)};function fS(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Ke(t,e,n):sp(t)(t,e)}const tj=5;function hS(t,e,n){const s=Math.max(e-tj,0);return V1(n-t(s),e-s)}const Xe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},$d=.001;function nj({duration:t=Xe.duration,bounce:e=Xe.bounce,velocity:n=Xe.velocity,mass:s=Xe.mass}){let o,l,u=1-e;u=rr(Xe.minDamping,Xe.maxDamping,u),t=rr(Xe.minDuration,Xe.maxDuration,nr(t)),u<1?(o=p=>{const g=p*u,v=g*t,w=g-n,T=zf(p,u),R=Math.exp(-v);return $d-w/T*R},l=p=>{const v=p*u*t,w=v*n+n,T=Math.pow(u,2)*Math.pow(p,2)*t,R=Math.exp(-v),b=zf(Math.pow(p,2),u);return(-o(p)+$d>0?-1:1)*((w-T)*R)/b}):(o=p=>{const g=Math.exp(-p*t),v=(p-n)*t+1;return-$d+g*v},l=p=>{const g=Math.exp(-p*t),v=(n-p)*(t*t);return g*v});const d=5/t,f=sj(o,l,d);if(t=tr(t),isNaN(f))return{stiffness:Xe.stiffness,damping:Xe.damping,duration:t};{const p=Math.pow(f,2)*s;return{stiffness:p,damping:u*2*Math.sqrt(s*p),duration:t}}}const rj=12;function sj(t,e,n){let s=n;for(let o=1;ot[n]!==void 0)}function aj(t){let e={velocity:Xe.velocity,stiffness:Xe.stiffness,damping:Xe.damping,mass:Xe.mass,isResolvedFromDuration:!1,...t};if(!Qv(t,oj)&&Qv(t,ij))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),o=s*s,l=2*rr(.05,1,1-(t.bounce||0))*Math.sqrt(o);e={...e,mass:Xe.mass,stiffness:o,damping:l}}else{const n=nj(t);e={...e,...n,mass:Xe.mass},e.isResolvedFromDuration=!0}return e}function pS(t=Xe.visualDuration,e=Xe.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=n;const l=n.keyframes[0],u=n.keyframes[n.keyframes.length-1],d={done:!1,value:l},{stiffness:f,damping:p,mass:g,duration:v,velocity:w,isResolvedFromDuration:T}=aj({...n,velocity:-nr(n.velocity||0)}),R=w||0,b=p/(2*Math.sqrt(f*g)),S=u-l,E=nr(Math.sqrt(f/g)),k=Math.abs(S)<5;s||(s=k?Xe.restSpeed.granular:Xe.restSpeed.default),o||(o=k?Xe.restDelta.granular:Xe.restDelta.default);let P;if(b<1){const F=zf(E,b);P=B=>{const q=Math.exp(-b*E*B);return u-q*((R+b*E*S)/F*Math.sin(F*B)+S*Math.cos(F*B))}}else if(b===1)P=F=>u-Math.exp(-E*F)*(S+(R+E*S)*F);else{const F=E*Math.sqrt(b*b-1);P=B=>{const q=Math.exp(-b*E*B),U=Math.min(F*B,300);return u-q*((R+b*E*S)*Math.sinh(U)+F*S*Math.cosh(U))/F}}const A={calculatedDuration:T&&v||null,next:F=>{const B=P(F);if(T)d.done=F>=v;else{let q=0;b<1&&(q=F===0?tr(R):hS(P,F,B));const U=Math.abs(q)<=s,Y=Math.abs(u-B)<=o;d.done=U&&Y}return d.value=d.done?u:B,d},toString:()=>{const F=Math.min(O1(A),Df),B=j1(q=>A.next(F*q).value,F,30);return F+"ms "+B}};return A}function Gv({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:u,min:d,max:f,restDelta:p=.5,restSpeed:g}){const v=t[0],w={done:!1,value:v},T=U=>d!==void 0&&Uf,R=U=>d===void 0?f:f===void 0||Math.abs(d-U)-b*Math.exp(-U/s),P=U=>E+k(U),A=U=>{const Y=k(U),ne=P(U);w.done=Math.abs(Y)<=p,w.value=w.done?E:ne};let F,B;const q=U=>{T(w.value)&&(F=U,B=pS({keyframes:[w.value,R(w.value)],velocity:hS(P,U,w.value),damping:o,stiffness:l,restDelta:p,restSpeed:g}))};return q(0),{calculatedDuration:null,next:U=>{let Y=!1;return!B&&F===void 0&&(Y=!0,A(U),q(U)),F!==void 0&&U>=F?B.next(U-F):(!Y&&A(U),w)}}}const lj=ma(.42,0,1,1),uj=ma(0,0,.58,1),mS=ma(.42,0,.58,1),cj=t=>Array.isArray(t)&&typeof t[0]!="number",dj={linear:Qt,easeIn:lj,easeInOut:mS,easeOut:uj,circIn:Zh,circInOut:G1,circOut:Q1,backIn:Jh,backInOut:q1,backOut:H1,anticipate:K1},Xv=t=>{if(Kh(t)){f1(t.length===4);const[e,n,s,o]=t;return ma(e,n,s,o)}else if(typeof t=="string")return dj[t];return t};function fj(t,e,n){const s=[],o=n||fS,l=t.length-1;for(let u=0;ue[0];if(l===2&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),e=[...e].reverse());const d=fj(e,s,o),f=d.length,p=g=>{if(u&&g1)for(;vp(rr(t[0],t[l-1],g)):p}function pj(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const o=Ai(0,e,s);t.push(Ke(n,1,o))}}function mj(t){const e=[0];return pj(e,t.length-1),e}function gj(t,e){return t.map(n=>n*e)}function yj(t,e){return t.map(()=>e||mS).splice(0,t.length-1)}function du({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const o=cj(s)?s.map(Xv):Xv(s),l={done:!1,value:e[0]},u=gj(n&&n.length===e.length?n:mj(e),t),d=hj(u,e,{ease:Array.isArray(o)?o:yj(e,o)});return{calculatedDuration:t,next:f=>(l.value=d(f),l.done=f>=t,l)}}const vj=t=>{const e=({timestamp:n})=>t(n);return{start:()=>$e.update(e,!0),stop:()=>zr(e),now:()=>yt.isProcessing?yt.timestamp:In.now()}},xj={decay:Gv,inertia:Gv,tween:du,keyframes:du,spring:pS},wj=t=>t/100;class ip extends cS{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:f}=this.options;f&&f()};const{name:n,motionValue:s,element:o,keyframes:l}=this.options,u=(o==null?void 0:o.KeyframeResolver)||rp,d=(f,p)=>this.onKeyframesResolved(f,p);this.resolver=new u(l,d,n,s,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l,velocity:u=0}=this.options,d=qh(n)?n:xj[n]||du;let f,p;d!==du&&typeof e[0]!="number"&&(f=ga(wj,fS(e[0],e[1])),e=[0,100]);const g=d({...this.options,keyframes:e});l==="mirror"&&(p=d({...this.options,keyframes:[...e].reverse(),velocity:-u})),g.calculatedDuration===null&&(g.calculatedDuration=O1(g));const{calculatedDuration:v}=g,w=v+o,T=w*(s+1)-o;return{generator:g,mirroredGenerator:p,mapPercentToKeyframes:f,calculatedDuration:v,resolvedDuration:w,totalDuration:T}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:U}=this.options;return{done:!0,value:U[U.length-1]}}const{finalKeyframe:o,generator:l,mirroredGenerator:u,mapPercentToKeyframes:d,keyframes:f,calculatedDuration:p,totalDuration:g,resolvedDuration:v}=s;if(this.startTime===null)return l.next(0);const{delay:w,repeat:T,repeatType:R,repeatDelay:b,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-g/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const E=this.currentTime-w*(this.speed>=0?1:-1),k=this.speed>=0?E<0:E>g;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=g);let P=this.currentTime,A=l;if(T){const U=Math.min(this.currentTime,g)/v;let Y=Math.floor(U),ne=U%1;!ne&&U>=1&&(ne=1),ne===1&&Y--,Y=Math.min(Y,T+1),!!(Y%2)&&(R==="reverse"?(ne=1-ne,b&&(ne-=b/v)):R==="mirror"&&(A=u)),P=rr(0,1,ne)*v}const F=k?{done:!1,value:f[0]}:A.next(P);d&&(F.value=d(F.value));let{done:B}=F;!k&&p!==null&&(B=this.speed>=0?this.currentTime>=g:this.currentTime<=0);const q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return q&&o!==void 0&&(F.value=_u(f,this.options,o)),S&&S(F.value),q&&this.finish(),F}get duration(){const{resolved:e}=this;return e?nr(e.calculatedDuration):0}get time(){return nr(this.currentTime)}set time(e){e=tr(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=nr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=vj,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(l=>this.tick(l))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Sj=new Set(["opacity","clipPath","filter","transform"]);function Ej(t,e,n,{delay:s=0,duration:o=300,repeat:l=0,repeatType:u="loop",ease:d="easeInOut",times:f}={}){const p={[e]:n};f&&(p.offset=f);const g=L1(d,o);return Array.isArray(g)&&(p.easing=g),t.animate(p,{delay:s,duration:o,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"})}const bj=Nh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),fu=10,Tj=2e4;function _j(t){return qh(t.type)||t.type==="spring"||!D1(t.ease)}function Cj(t,e){const n=new ip({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const o=[];let l=0;for(;!s.done&&lthis.onKeyframesResolved(u,d),n,s,o),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:s=300,times:o,ease:l,type:u,motionValue:d,name:f,startTime:p}=this.options;if(!d.owner||!d.owner.current)return!1;if(typeof l=="string"&&uu()&&Pj(l)&&(l=gS[l]),_j(this.options)){const{onComplete:v,onUpdate:w,motionValue:T,element:R,...b}=this.options,S=Cj(e,b);e=S.keyframes,e.length===1&&(e[1]=e[0]),s=S.duration,o=S.times,l=S.ease,u="keyframes"}const g=Ej(d.owner.current,f,e,{...this.options,duration:s,times:o,ease:l});return g.startTime=p??this.calcStartTime(),this.pendingTimeline?(Lv(g,this.pendingTimeline),this.pendingTimeline=void 0):g.onfinish=()=>{const{onComplete:v}=this.options;d.set(_u(e,this.options,n)),v&&v(),this.cancel(),this.resolveFinishedPromise()},{animation:g,duration:s,times:o,type:u,ease:l,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return nr(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return nr(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=tr(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return Qt;const{animation:s}=n;Lv(s,e)}return Qt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:o,type:l,ease:u,times:d}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:p,onUpdate:g,onComplete:v,element:w,...T}=this.options,R=new ip({...T,keyframes:s,duration:o,type:l,ease:u,times:d,isGenerator:!0}),b=tr(this.time);p.setWithVelocity(R.sample(b-fu).value,R.sample(b).value,fu)}const{onStop:f}=this.options;f&&f(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:o,repeatType:l,damping:u,type:d}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:p}=n.owner.getProps();return bj()&&s&&Sj.has(s)&&!f&&!p&&!o&&l!=="mirror"&&u!==0&&d!=="inertia"}}const Rj={type:"spring",stiffness:500,damping:25,restSpeed:10},kj=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Aj={type:"keyframes",duration:.8},Nj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Oj=(t,{keyframes:e})=>e.length>2?Aj:Fs.has(t)?t.startsWith("scale")?kj(e[1]):Rj:Nj;function jj({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:o,repeat:l,repeatType:u,repeatDelay:d,from:f,elapsed:p,...g}){return!!Object.keys(g).length}const op=(t,e,n,s={},o,l)=>u=>{const d=Hh(s,t)||{},f=d.delay||s.delay||0;let{elapsed:p=0}=s;p=p-tr(f);let g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...d,delay:-p,onUpdate:w=>{e.set(w),d.onUpdate&&d.onUpdate(w)},onComplete:()=>{u(),d.onComplete&&d.onComplete()},name:t,motionValue:e,element:l?void 0:o};jj(d)||(g={...g,...Oj(t,g)}),g.duration&&(g.duration=tr(g.duration)),g.repeatDelay&&(g.repeatDelay=tr(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let v=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(v=!0)),v&&!l&&e.get()!==void 0){const w=_u(g.keyframes,d);if(w!==void 0)return $e.update(()=>{g.onUpdate(w),g.onComplete()}),new J2([])}return!l&&Yv.supports(g)?new Yv(g):new ip(g)};function Dj({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function yS(t,e,{delay:n=0,transitionOverride:s,type:o}={}){var l;let{transition:u=t.getDefaultTransition(),transitionEnd:d,...f}=e;s&&(u=s);const p=[],g=o&&t.animationState&&t.animationState.getState()[o];for(const v in f){const w=t.getValue(v,(l=t.latestValues[v])!==null&&l!==void 0?l:null),T=f[v];if(T===void 0||g&&Dj(g,v))continue;const R={delay:n,...Hh(u||{},v)};let b=!1;if(window.MotionHandoffAnimation){const E=B1(t);if(E){const k=window.MotionHandoffAnimation(E,v,$e);k!==null&&(R.startTime=k,b=!0)}}Mf(t,v),w.start(op(v,w,T,t.shouldReduceMotion&&U1.has(v)?{type:!1}:R,t,b));const S=w.animation;S&&p.push(S)}return d&&Promise.all(p).then(()=>{$e.update(()=>{d&&fO(t,d)})}),p}function $f(t,e,n={}){var s;const o=Tu(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:l=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(l=n.transitionOverride);const u=o?()=>Promise.all(yS(t,o,n)):()=>Promise.resolve(),d=t.variantChildren&&t.variantChildren.size?(p=0)=>{const{delayChildren:g=0,staggerChildren:v,staggerDirection:w}=l;return Lj(t,e,g+p,v,w,n)}:()=>Promise.resolve(),{when:f}=l;if(f){const[p,g]=f==="beforeChildren"?[u,d]:[d,u];return p().then(()=>g())}else return Promise.all([u(),d(n.delay)])}function Lj(t,e,n=0,s=0,o=1,l){const u=[],d=(t.variantChildren.size-1)*s,f=o===1?(p=0)=>p*s:(p=0)=>d-p*s;return Array.from(t.variantChildren).sort(Mj).forEach((p,g)=>{p.notify("AnimationStart",e),u.push($f(p,e,{...l,delay:n+f(g)}).then(()=>p.notify("AnimationComplete",e)))}),Promise.all(u)}function Mj(t,e){return t.sortNodePosition(e)}function Ij(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const o=e.map(l=>$f(t,l,n));s=Promise.all(o)}else if(typeof e=="string")s=$f(t,e,n);else{const o=typeof e=="function"?Tu(t,e,n.custom):e;s=Promise.all(yS(t,o,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Fj=jh.length;function vS(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?vS(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;nPromise.all(e.map(({animation:n,options:s})=>Ij(t,n,s)))}function zj(t){let e=Bj(t),n=Jv(),s=!0;const o=f=>(p,g)=>{var v;const w=Tu(t,g,f==="exit"?(v=t.presenceContext)===null||v===void 0?void 0:v.custom:void 0);if(w){const{transition:T,transitionEnd:R,...b}=w;p={...p,...b,...R}}return p};function l(f){e=f(t)}function u(f){const{props:p}=t,g=vS(t.parent)||{},v=[],w=new Set;let T={},R=1/0;for(let S=0;SR&&A,Y=!1;const ne=Array.isArray(P)?P:[P];let xe=ne.reduce(o(E),{});F===!1&&(xe={});const{prevResolvedValues:Pe={}}=k,Ee={...Pe,...xe},Z=de=>{U=!0,w.has(de)&&(Y=!0,w.delete(de)),k.needsAnimating[de]=!0;const Q=t.getValue(de);Q&&(Q.liveStyle=!1)};for(const de in Ee){const Q=xe[de],se=Pe[de];if(T.hasOwnProperty(de))continue;let z=!1;jf(Q)&&jf(se)?z=!N1(Q,se):z=Q!==se,z?Q!=null?Z(de):w.add(de):Q!==void 0&&w.has(de)?Z(de):k.protectedKeys[de]=!0}k.prevProp=P,k.prevResolvedValues=xe,k.isActive&&(T={...T,...xe}),s&&t.blockInitialAnimation&&(U=!1),U&&(!(B&&q)||Y)&&v.push(...ne.map(de=>({animation:de,options:{type:E}})))}if(w.size){const S={};w.forEach(E=>{const k=t.getBaseTarget(E),P=t.getValue(E);P&&(P.liveStyle=!0),S[E]=k??null}),v.push({animation:S})}let b=!!v.length;return s&&(p.initial===!1||p.initial===p.animate)&&!t.manuallyAnimateOnMount&&(b=!1),s=!1,b?e(v):Promise.resolve()}function d(f,p){var g;if(n[f].isActive===p)return Promise.resolve();(g=t.variantChildren)===null||g===void 0||g.forEach(w=>{var T;return(T=w.animationState)===null||T===void 0?void 0:T.setActive(f,p)}),n[f].isActive=p;const v=u(f);for(const w in n)n[w].protectedKeys={};return v}return{animateChanges:u,setActive:d,setAnimateFunction:l,getState:()=>n,reset:()=>{n=Jv(),s=!0}}}function $j(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!N1(e,t):!1}function fs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jv(){return{animate:fs(!0),whileInView:fs(),whileHover:fs(),whileTap:fs(),whileDrag:fs(),whileFocus:fs(),exit:fs()}}class Xr{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Wj extends Xr{constructor(e){super(e),e.animationState||(e.animationState=zj(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Eu(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let Hj=0;class qj extends Xr{constructor(){super(...arguments),this.id=Hj++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Kj={animation:{Feature:Wj},exit:{Feature:qj}};function ta(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function ya(t){return{point:{x:t.pageX,y:t.pageY}}}const Qj=t=>e=>Qh(e)&&t(e,ya(e));function zo(t,e,n,s){return ta(t,e,Qj(n),s)}const Zv=(t,e)=>Math.abs(t-e);function Gj(t,e){const n=Zv(t.x,e.x),s=Zv(t.y,e.y);return Math.sqrt(n**2+s**2)}class xS{constructor(e,n,{transformPagePoint:s,contextWindow:o,dragSnapToOrigin:l=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Hd(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,T=Gj(v.offset,{x:0,y:0})>=3;if(!w&&!T)return;const{point:R}=v,{timestamp:b}=yt;this.history.push({...R,timestamp:b});const{onStart:S,onMove:E}=this.handlers;w||(S&&S(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,v)},this.handlePointerMove=(v,w)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=Wd(w,this.transformPagePoint),$e.update(this.updatePoint,!0)},this.handlePointerUp=(v,w)=>{this.end();const{onEnd:T,onSessionEnd:R,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Hd(v.type==="pointercancel"?this.lastMoveEventInfo:Wd(w,this.transformPagePoint),this.history);this.startEvent&&T&&T(v,S),R&&R(v,S)},!Qh(e))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=s,this.contextWindow=o||window;const u=ya(e),d=Wd(u,this.transformPagePoint),{point:f}=d,{timestamp:p}=yt;this.history=[{...f,timestamp:p}];const{onSessionStart:g}=n;g&&g(e,Hd(d,this.history)),this.removeListeners=ga(zo(this.contextWindow,"pointermove",this.handlePointerMove),zo(this.contextWindow,"pointerup",this.handlePointerUp),zo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),zr(this.updatePoint)}}function Wd(t,e){return e?{point:e(t.point)}:t}function e0(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Hd({point:t},e){return{point:t,delta:e0(t,wS(e)),offset:e0(t,Xj(e)),velocity:Yj(e,.1)}}function Xj(t){return t[0]}function wS(t){return t[t.length-1]}function Yj(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const o=wS(t);for(;n>=0&&(s=t[n],!(o.timestamp-s.timestamp>tr(e)));)n--;if(!s)return{x:0,y:0};const l=nr(o.timestamp-s.timestamp);if(l===0)return{x:0,y:0};const u={x:(o.x-s.x)/l,y:(o.y-s.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}const SS=1e-4,Jj=1-SS,Zj=1+SS,ES=.01,eD=0-ES,tD=0+ES;function Gt(t){return t.max-t.min}function nD(t,e,n){return Math.abs(t-e)<=n}function t0(t,e,n,s=.5){t.origin=s,t.originPoint=Ke(e.min,e.max,t.origin),t.scale=Gt(n)/Gt(e),t.translate=Ke(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Jj&&t.scale<=Zj||isNaN(t.scale))&&(t.scale=1),(t.translate>=eD&&t.translate<=tD||isNaN(t.translate))&&(t.translate=0)}function $o(t,e,n,s){t0(t.x,e.x,n.x,s?s.originX:void 0),t0(t.y,e.y,n.y,s?s.originY:void 0)}function n0(t,e,n){t.min=n.min+e.min,t.max=t.min+Gt(e)}function rD(t,e,n){n0(t.x,e.x,n.x),n0(t.y,e.y,n.y)}function r0(t,e,n){t.min=e.min-n.min,t.max=t.min+Gt(e)}function Wo(t,e,n){r0(t.x,e.x,n.x),r0(t.y,e.y,n.y)}function sD(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?Ke(n,t,s.max):Math.min(t,n)),t}function s0(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function iD(t,{top:e,left:n,bottom:s,right:o}){return{x:s0(t.x,n,o),y:s0(t.y,e,s)}}function i0(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=Ai(e.min,e.max-s,t.min):s>o&&(n=Ai(t.min,t.max-o,e.min)),rr(0,1,n)}function lD(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Wf=.35;function uD(t=Wf){return t===!1?t=0:t===!0&&(t=Wf),{x:o0(t,"left","right"),y:o0(t,"top","bottom")}}function o0(t,e,n){return{min:a0(t,e),max:a0(t,n)}}function a0(t,e){return typeof t=="number"?t:t[e]||0}const l0=()=>({translate:0,scale:1,origin:0,originPoint:0}),hi=()=>({x:l0(),y:l0()}),u0=()=>({min:0,max:0}),Ze=()=>({x:u0(),y:u0()});function an(t){return[t("x"),t("y")]}function bS({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function cD({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function dD(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function qd(t){return t===void 0||t===1}function Hf({scale:t,scaleX:e,scaleY:n}){return!qd(t)||!qd(e)||!qd(n)}function ps(t){return Hf(t)||TS(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function TS(t){return c0(t.x)||c0(t.y)}function c0(t){return t&&t!=="0%"}function hu(t,e,n){const s=t-n,o=e*s;return n+o}function d0(t,e,n,s,o){return o!==void 0&&(t=hu(t,o,s)),hu(t,n,s)+e}function qf(t,e=0,n=1,s,o){t.min=d0(t.min,e,n,s,o),t.max=d0(t.max,e,n,s,o)}function _S(t,{x:e,y:n}){qf(t.x,e.translate,e.scale,e.originPoint),qf(t.y,n.translate,n.scale,n.originPoint)}const f0=.999999999999,h0=1.0000000000001;function fD(t,e,n,s=!1){const o=n.length;if(!o)return;e.x=e.y=1;let l,u;for(let d=0;df0&&(e.x=1),e.yf0&&(e.y=1)}function pi(t,e){t.min=t.min+e,t.max=t.max+e}function p0(t,e,n,s,o=.5){const l=Ke(t.min,t.max,o);qf(t,e,n,l,s)}function mi(t,e){p0(t.x,e.x,e.scaleX,e.scale,e.originX),p0(t.y,e.y,e.scaleY,e.scale,e.originY)}function CS(t,e){return bS(dD(t.getBoundingClientRect(),e))}function hD(t,e,n){const s=CS(t,n),{scroll:o}=e;return o&&(pi(s.x,o.offset.x),pi(s.y,o.offset.y)),s}const PS=({current:t})=>t?t.ownerDocument.defaultView:null,pD=new WeakMap;class mD{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ze(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=g=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ya(g).point)},l=(g,v)=>{const{drag:w,dragPropagation:T,onDragStart:R}=this.getProps();if(w&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=aO(w),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),an(S=>{let E=this.getAxisMotionValue(S).get()||0;if(Mn.test(E)){const{projection:k}=this.visualElement;if(k&&k.layout){const P=k.layout.layoutBox[S];P&&(E=Gt(P)*(parseFloat(E)/100))}}this.originPoint[S]=E}),R&&$e.postRender(()=>R(g,v)),Mf(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},u=(g,v)=>{const{dragPropagation:w,dragDirectionLock:T,onDirectionLock:R,onDrag:b}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:S}=v;if(T&&this.currentDirection===null){this.currentDirection=gD(S),this.currentDirection!==null&&R&&R(this.currentDirection);return}this.updateAxis("x",v.point,S),this.updateAxis("y",v.point,S),this.visualElement.render(),b&&b(g,v)},d=(g,v)=>this.stop(g,v),f=()=>an(g=>{var v;return this.getAnimationState(g)==="paused"&&((v=this.getAxisMotionValue(g).animation)===null||v===void 0?void 0:v.play())}),{dragSnapToOrigin:p}=this.getProps();this.panSession=new xS(e,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:d,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,contextWindow:PS(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&$e.postRender(()=>l(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:o}=this.getProps();if(!s||!Vl(e,o,this.currentDirection))return;const l=this.getAxisMotionValue(e);let u=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(u=sD(u,this.constraints[e],this.elastic[e])),l.set(u)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,l=this.constraints;n&&di(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=iD(o.layoutBox,n):this.constraints=!1,this.elastic=uD(s),l!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&an(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=lD(o.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!di(e))return!1;const s=e.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=hD(s,o.root,this.visualElement.getTransformPagePoint());let u=oD(o.layout.layoutBox,l);if(n){const d=n(cD(u));this.hasMutatedConstraints=!!d,d&&(u=bS(d))}return u}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:o,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},p=an(g=>{if(!Vl(g,n,this.currentDirection))return;let v=f&&f[g]||{};u&&(v={min:0,max:0});const w=o?200:1e6,T=o?40:1e7,R={type:"inertia",velocity:s?e[g]:0,bounceStiffness:w,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...l,...v};return this.startAxisValueAnimation(g,R)});return Promise.all(p).then(d)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Mf(this.visualElement,e),s.start(op(e,s,0,n,this.visualElement,!1))}stopAnimation(){an(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){an(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),o=s[n];return o||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){an(n=>{const{drag:s}=this.getProps();if(!Vl(n,s,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(n);if(o&&o.layout){const{min:u,max:d}=o.layout.layoutBox[n];l.set(e[n]-Ke(u,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!di(n)||!s||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};an(u=>{const d=this.getAxisMotionValue(u);if(d&&this.constraints!==!1){const f=d.get();o[u]=aD({min:f,max:f},this.constraints[u])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),an(u=>{if(!Vl(u,e,null))return;const d=this.getAxisMotionValue(u),{min:f,max:p}=this.constraints[u];d.set(Ke(f,p,o[u]))})}addListeners(){if(!this.visualElement.current)return;pD.set(this.visualElement,this);const e=this.visualElement.current,n=zo(e,"pointerdown",f=>{const{drag:p,dragListener:g=!0}=this.getProps();p&&g&&this.start(f)}),s=()=>{const{dragConstraints:f}=this.getProps();di(f)&&f.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,l=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),$e.read(s);const u=ta(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:p})=>{this.isDragging&&p&&(an(g=>{const v=this.getAxisMotionValue(g);v&&(this.originPoint[g]+=f[g].translate,v.set(v.get()+f[g].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),d&&d()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:u=Wf,dragMomentum:d=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:o,dragConstraints:l,dragElastic:u,dragMomentum:d}}}function Vl(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function gD(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class yD extends Xr{constructor(e){super(e),this.removeGroupControls=Qt,this.removeListeners=Qt,this.controls=new mD(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qt}unmount(){this.removeGroupControls(),this.removeListeners()}}const m0=t=>(e,n)=>{t&&$e.postRender(()=>t(e,n))};class vD extends Xr{constructor(){super(...arguments),this.removePointerDownListener=Qt}onPointerDown(e){this.session=new xS(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:PS(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:o}=this.node.getProps();return{onSessionStart:m0(e),onStart:m0(n),onMove:s,onEnd:(l,u)=>{delete this.session,o&&$e.postRender(()=>o(l,u))}}}mount(){this.removePointerDownListener=zo(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const eu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function g0(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ao={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ve.test(t))t=parseFloat(t);else return t;const n=g0(t,e.target.x),s=g0(t,e.target.y);return`${n}% ${s}%`}},xD={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,o=$r.parse(t);if(o.length>5)return s;const l=$r.createTransformer(t),u=typeof o[0]!="number"?1:0,d=n.x.scale*e.x,f=n.y.scale*e.y;o[0+u]/=d,o[1+u]/=f;const p=Ke(d,f,.5);return typeof o[2+u]=="number"&&(o[2+u]/=p),typeof o[3+u]=="number"&&(o[3+u]/=p),l(o)}};class wD extends _.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:o}=this.props,{projection:l}=e;V2(SD),l&&(n.group&&n.group.add(l),s&&s.register&&o&&s.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),eu.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:o,isPresent:l}=this.props,u=s.projection;return u&&(u.isPresent=l,o||e.layoutDependency!==n||n===void 0?u.willUpdate():this.safeToRemove(),e.isPresent!==l&&(l?u.promote():u.relegate()||$e.postRender(()=>{const d=u.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Lh.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),s&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function RS(t){const[e,n]=t2(),s=_.useContext(c1);return y.jsx(wD,{...t,layoutGroup:s,switchLayoutGroup:_.useContext(v1),isPresent:e,safeToRemove:n})}const SD={borderRadius:{...Ao,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ao,borderTopRightRadius:Ao,borderBottomLeftRadius:Ao,borderBottomRightRadius:Ao,boxShadow:xD};function ED(t,e,n){const s=Pt(t)?t:Zo(t);return s.start(op("",s,e,n)),s.animation}function bD(t){return t instanceof SVGElement&&t.tagName!=="svg"}const TD=(t,e)=>t.depth-e.depth;class _D{constructor(){this.children=[],this.isDirty=!1}add(e){Gh(this.children,e),this.isDirty=!0}remove(e){Xh(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(TD),this.isDirty=!1,this.children.forEach(e)}}function CD(t,e){const n=In.now(),s=({timestamp:o})=>{const l=o-n;l>=e&&(zr(s),t(l-e))};return $e.read(s,!0),()=>zr(s)}const kS=["TopLeft","TopRight","BottomLeft","BottomRight"],PD=kS.length,y0=t=>typeof t=="string"?parseFloat(t):t,v0=t=>typeof t=="number"||ve.test(t);function RD(t,e,n,s,o,l){o?(t.opacity=Ke(0,n.opacity!==void 0?n.opacity:1,kD(s)),t.opacityExit=Ke(e.opacity!==void 0?e.opacity:1,0,AD(s))):l&&(t.opacity=Ke(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let u=0;use?1:n(Ai(t,e,s))}function w0(t,e){t.min=e.min,t.max=e.max}function on(t,e){w0(t.x,e.x),w0(t.y,e.y)}function S0(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function E0(t,e,n,s,o){return t-=e,t=hu(t,1/n,s),o!==void 0&&(t=hu(t,1/o,s)),t}function ND(t,e=0,n=1,s=.5,o,l=t,u=t){if(Mn.test(e)&&(e=parseFloat(e),e=Ke(u.min,u.max,e/100)-u.min),typeof e!="number")return;let d=Ke(l.min,l.max,s);t===l&&(d-=e),t.min=E0(t.min,e,n,d,o),t.max=E0(t.max,e,n,d,o)}function b0(t,e,[n,s,o],l,u){ND(t,e[n],e[s],e[o],e.scale,l,u)}const OD=["x","scaleX","originX"],jD=["y","scaleY","originY"];function T0(t,e,n,s){b0(t.x,e,OD,n?n.x:void 0,s?s.x:void 0),b0(t.y,e,jD,n?n.y:void 0,s?s.y:void 0)}function _0(t){return t.translate===0&&t.scale===1}function NS(t){return _0(t.x)&&_0(t.y)}function C0(t,e){return t.min===e.min&&t.max===e.max}function DD(t,e){return C0(t.x,e.x)&&C0(t.y,e.y)}function P0(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function OS(t,e){return P0(t.x,e.x)&&P0(t.y,e.y)}function R0(t){return Gt(t.x)/Gt(t.y)}function k0(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class LD{constructor(){this.members=[]}add(e){Gh(this.members,e),e.scheduleRender()}remove(e){if(Xh(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let s;for(let o=n;o>=0;o--){const l=this.members[o];if(l.isPresent!==!1){s=l;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function MD(t,e,n){let s="";const o=t.x.translate/e.x,l=t.y.translate/e.y,u=(n==null?void 0:n.z)||0;if((o||l||u)&&(s=`translate3d(${o}px, ${l}px, ${u}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:p,rotate:g,rotateX:v,rotateY:w,skewX:T,skewY:R}=n;p&&(s=`perspective(${p}px) ${s}`),g&&(s+=`rotate(${g}deg) `),v&&(s+=`rotateX(${v}deg) `),w&&(s+=`rotateY(${w}deg) `),T&&(s+=`skewX(${T}deg) `),R&&(s+=`skewY(${R}deg) `)}const d=t.x.scale*e.x,f=t.y.scale*e.y;return(d!==1||f!==1)&&(s+=`scale(${d}, ${f})`),s||"none"}const ms={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Fo=typeof window<"u"&&window.MotionDebug!==void 0,Kd=["","X","Y","Z"],ID={visibility:"hidden"},A0=1e3;let FD=0;function Qd(t,e,n,s){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),s&&(s[t]=0))}function jS(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=B1(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:l}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",$e,!(o||l))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&jS(s)}function DS({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(u={},d=e==null?void 0:e()){this.id=FD++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Fo&&(ms.totalNodes=ms.resolvedTargetDeltas=ms.recalculatedProjection=0),this.nodes.forEach(BD),this.nodes.forEach(qD),this.nodes.forEach(KD),this.nodes.forEach(zD),Fo&&window.MotionDebug.record(ms)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let f=0;fthis.root.updateBlockedByResize=!1;t(u,()=>{this.root.updateBlockedByResize=!0,v&&v(),v=CD(w,250),eu.hasAnimatedSinceResize&&(eu.hasAnimatedSinceResize=!1,this.nodes.forEach(O0))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&g&&(f||p)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:w,hasRelativeTargetChanged:T,layout:R})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||g.getDefaultTransition()||JD,{onLayoutAnimationStart:S,onLayoutAnimationComplete:E}=g.getProps(),k=!this.targetLayout||!OS(this.targetLayout,R)||T,P=!w&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||P||w&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(v,P);const A={...Hh(b,"layout"),onPlay:S,onComplete:E};(g.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else w||O0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=R})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(QD),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f{const F=A/1e3;j0(v.x,u.x,F),j0(v.y,u.y,F),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wo(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox),XD(this.relativeTarget,this.relativeTargetOrigin,w,F),P&&DD(this.relativeTarget,P)&&(this.isProjectionDirty=!1),P||(P=Ze()),on(P,this.relativeTarget)),b&&(this.animationValues=g,RD(g,p,this.latestValues,F,k,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$e.update(()=>{eu.hasAnimatedSinceResize=!0,this.currentAnimation=ED(0,A0,{...u,onUpdate:d=>{this.mixTargetDelta(d),u.onUpdate&&u.onUpdate(d)},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(A0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:d,target:f,layout:p,latestValues:g}=u;if(!(!d||!f||!p)){if(this!==u&&this.layout&&p&&LS(this.options.animationType,this.layout.layoutBox,p.layoutBox)){f=this.target||Ze();const v=Gt(this.layout.layoutBox.x);f.x.min=u.target.x.min,f.x.max=f.x.min+v;const w=Gt(this.layout.layoutBox.y);f.y.min=u.target.y.min,f.y.max=f.y.min+w}on(d,f),mi(d,g),$o(this.projectionDeltaWithTransform,this.layoutCorrected,d,g)}}registerSharedNode(u,d){this.sharedNodes.has(u)||this.sharedNodes.set(u,new LD),this.sharedNodes.get(u).add(d);const p=d.options.initialPromotionConfig;d.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(d):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var u;const{layoutId:d}=this.options;return d?((u=this.getStack())===null||u===void 0?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:d}=this.options;return d?(u=this.getStack())===null||u===void 0?void 0:u.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:d,preserveFollowOpacity:f}={}){const p=this.getStack();p&&p.promote(this,f),u&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let d=!1;const{latestValues:f}=u;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(d=!0),!d)return;const p={};f.z&&Qd("z",u,p,this.animationValues);for(let g=0;g{var d;return(d=u.currentAnimation)===null||d===void 0?void 0:d.stop()}),this.root.nodes.forEach(N0),this.root.sharedNodes.clear()}}}function UD(t){t.updateLayout()}function VD(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:l}=t.options,u=n.source!==t.layout.source;l==="size"?an(v=>{const w=u?n.measuredBox[v]:n.layoutBox[v],T=Gt(w);w.min=s[v].min,w.max=w.min+T}):LS(l,n.layoutBox,s)&&an(v=>{const w=u?n.measuredBox[v]:n.layoutBox[v],T=Gt(s[v]);w.max=w.min+T,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[v].max=t.relativeTarget[v].min+T)});const d=hi();$o(d,s,n.layoutBox);const f=hi();u?$o(f,t.applyTransform(o,!0),n.measuredBox):$o(f,s,n.layoutBox);const p=!NS(d);let g=!1;if(!t.resumeFrom){const v=t.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:w,layout:T}=v;if(w&&T){const R=Ze();Wo(R,n.layoutBox,w.layoutBox);const b=Ze();Wo(b,s,T.layoutBox),OS(R,b)||(g=!0),v.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=R,t.relativeParent=v)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:f,layoutDelta:d,hasLayoutChanged:p,hasRelativeTargetChanged:g})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function BD(t){Fo&&ms.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function zD(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function $D(t){t.clearSnapshot()}function N0(t){t.clearMeasurements()}function WD(t){t.isLayoutDirty=!1}function HD(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function O0(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function qD(t){t.resolveTargetDelta()}function KD(t){t.calcProjection()}function QD(t){t.resetSkewAndRotation()}function GD(t){t.removeLeadSnapshot()}function j0(t,e,n){t.translate=Ke(e.translate,0,n),t.scale=Ke(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function D0(t,e,n,s){t.min=Ke(e.min,n.min,s),t.max=Ke(e.max,n.max,s)}function XD(t,e,n,s){D0(t.x,e.x,n.x,s),D0(t.y,e.y,n.y,s)}function YD(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const JD={duration:.45,ease:[.4,0,.1,1]},L0=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),M0=L0("applewebkit/")&&!L0("chrome/")?Math.round:Qt;function I0(t){t.min=M0(t.min),t.max=M0(t.max)}function ZD(t){I0(t.x),I0(t.y)}function LS(t,e,n){return t==="position"||t==="preserve-aspect"&&!nD(R0(e),R0(n),.2)}function eL(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const tL=DS({attachResizeListener:(t,e)=>ta(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Gd={current:void 0},MS=DS({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Gd.current){const t=new tL({});t.mount(window),t.setOptions({layoutScroll:!0}),Gd.current=t}return Gd.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),nL={pan:{Feature:vD},drag:{Feature:yD,ProjectionNode:MS,MeasureLayout:RS}};function F0(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,l=s[o];l&&$e.postRender(()=>l(e,ya(e)))}class rL extends Xr{mount(){const{current:e}=this.node;e&&(this.unmount=nO(e,n=>(F0(this.node,n,"Start"),s=>F0(this.node,s,"End"))))}unmount(){}}class sL extends Xr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ga(ta(this.node.current,"focus",()=>this.onFocus()),ta(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function U0(t,e,n){const{props:s}=t;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),l=s[o];l&&$e.postRender(()=>l(e,ya(e)))}class iL extends Xr{mount(){const{current:e}=this.node;e&&(this.unmount=oO(e,n=>(U0(this.node,n,"Start"),(s,{success:o})=>U0(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Kf=new WeakMap,Xd=new WeakMap,oL=t=>{const e=Kf.get(t.target);e&&e(t)},aL=t=>{t.forEach(oL)};function lL({root:t,...e}){const n=t||document;Xd.has(n)||Xd.set(n,{});const s=Xd.get(n),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(aL,{root:t,...e})),s[o]}function uL(t,e,n){const s=lL(e);return Kf.set(t,n),s.observe(t),()=>{Kf.delete(t),s.unobserve(t)}}const cL={some:0,all:1};class dL extends Xr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:o="some",once:l}=e,u={root:n?n.current:void 0,rootMargin:s,threshold:typeof o=="number"?o:cL[o]},d=f=>{const{isIntersecting:p}=f;if(this.isInView===p||(this.isInView=p,l&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:g,onViewportLeave:v}=this.node.getProps(),w=p?g:v;w&&w(f)};return uL(this.node.current,u,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(fL(e,n))&&this.startObserver()}unmount(){}}function fL({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const hL={inView:{Feature:dL},tap:{Feature:iL},focus:{Feature:sL},hover:{Feature:rL}},pL={layout:{ProjectionNode:MS,MeasureLayout:RS}},pu={current:null},ap={current:!1};function IS(){if(ap.current=!0,!!Ah)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>pu.current=t.matches;t.addListener(e),e()}else pu.current=!1}const mL=[...lS,Ct,$r],gL=t=>mL.find(aS(t)),V0=new WeakMap;function yL(t,e,n){for(const s in e){const o=e[s],l=n[s];if(Pt(o))t.addValue(s,o);else if(Pt(l))t.addValue(s,Zo(o,{owner:t}));else if(l!==o)if(t.hasValue(s)){const u=t.getValue(s);u.liveStyle===!0?u.jump(o):u.hasAnimated||u.set(o)}else{const u=t.getStaticValue(s);t.addValue(s,Zo(u!==void 0?u:o,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const B0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class vL{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:o,blockInitialAnimation:l,visualState:u},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=rp,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const T=In.now();this.renderScheduledAtthis.bindToMotionValue(s,n)),ap.current||IS(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:pu.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){V0.delete(this.current),this.projection&&this.projection.unmount(),zr(this.notifyUpdate),zr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Fs.has(e),o=n.on("change",d=>{this.latestValues[e]=d,this.props.onUpdate&&$e.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),l=n.on("renderRequest",this.scheduleRender);let u;window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{o(),l(),u&&u(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ni){const n=Ni[e];if(!n)continue;const{isEnabled:s,Feature:o}=n;if(!this.features[e]&&o&&s(this.props)&&(this.features[e]=new o(this)),this.features[e]){const l=this.features[e];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ze()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Zo(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(iS(o)||X1(o))?o=parseFloat(o):!gL(o)&&$r.test(n)&&(o=nS(e,n)),this.setBaseTarget(e,Pt(o)?o.get():o)),Pt(o)?o.get():o}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let o;if(typeof s=="string"||typeof s=="object"){const u=Ih(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);u&&(o=u[e])}if(s&&o!==void 0)return o;const l=this.getBaseTargetFromProps(this.props,e);return l!==void 0&&!Pt(l)?l:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Yh),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class FS extends vL{constructor(){super(...arguments),this.KeyframeResolver=uS}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Pt(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function xL(t){return window.getComputedStyle(t)}class wL extends FS{constructor(){super(...arguments),this.type="html",this.renderInstance=_1}readValueFromInstance(e,n){if(Fs.has(n)){const s=np(n);return s&&s.default||0}else{const s=xL(e),o=(E1(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return CS(e,n)}build(e,n,s){Vh(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Wh(e,n,s)}}class SL extends FS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Fs.has(n)){const s=np(n);return s&&s.default||0}return n=C1.has(n)?n:Dh(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return k1(e,n,s)}build(e,n,s){Bh(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,o){P1(e,n,s,o)}mount(e){this.isSVGTag=$h(e.tagName),super.mount(e)}}const EL=(t,e)=>Mh(t)?new SL(e):new wL(e,{allowProjection:t!==_.Fragment}),bL=G2({...Kj,...hL,...nL,...pL},EL),Qf=c2(bL);function TL(){!ap.current&&IS();const[t]=_.useState(pu.current);return t}function ue({children:t,as:e="div",className:n="",delay:s=0,y:o=16,once:l=!0,...u}){const d=TL(),f=Qf[e]||Qf.div;return y.jsx(f,{initial:{opacity:0,y:d?0:o},whileInView:{opacity:1,y:0},viewport:{once:l,margin:"-8% 0px"},transition:{duration:.45,ease:[.22,1,.36,1],delay:s},className:n,...u,children:t})}function Bt({children:t,className:e=""}){return y.jsx("div",{className:`mx-auto w-full max-w-[1440px] px-5 sm:px-10 lg:px-[60px] xl:px-[80px] ${e}`,children:t})}function zt({children:t,className:e=""}){return y.jsx("span",{className:`block text-[11px] uppercase tracking-[0.15em] font-medium ${e}`,children:t})}const _L={light:"border-[#202020] text-[#202020] hover:bg-[#6E1830] hover:text-white hover:border-[#6E1830]",dark:"border-white/80 text-white hover:bg-[#6E1830] hover:border-[#6E1830]",onMaroon:"border-white/80 text-white hover:bg-white hover:text-[#6E1830] hover:border-white"};function Ms({to:t,href:e,children:n,tone:s="light",className:o=""}){const l=`group inline-flex items-center gap-2.5 h-12 px-7 border text-[11px] uppercase tracking-[0.11em] font-medium transition-colors duration-200 ${_L[s]} ${o}`,u=y.jsxs(y.Fragment,{children:[y.jsx("span",{children:n}),y.jsx("span",{className:"inline-block transition-transform duration-200 group-hover:translate-x-[5px]",children:"→"})]});return e?y.jsx("a",{href:e,className:l,children:u}):y.jsx(dn,{to:t,className:l,children:u})}function va({className:t="",tone:e="charcoal"}){const n=e==="maroon"?"bg-[#6E1830]":e==="white"?"bg-white":"bg-[#202020]";return y.jsx(Qf.div,{initial:{scaleX:0},whileInView:{scaleX:1},viewport:{once:!0},transition:{duration:.6,ease:"easeOut"},className:`h-px origin-left ${n} ${t}`})}const CL="https://media.base44.com/images/public/6a7a05939fa1d342611ac45e/15b629b6d_generated_9ea98ef7.png",PL=[{label:"Core Platform",value:"Real Estate"},{label:"Focus",value:"Investment / Development / Ownership"},{label:"Market",value:"Qatar"},{label:"Capabilities",value:"Development / Project Management / Asset Management"}];function RL(){return y.jsxs("section",{className:"bg-[#202020] text-white",children:[y.jsx("div",{className:"mx-auto max-w-[1440px] px-5 sm:px-10 lg:px-[60px] xl:px-[80px]",children:y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[57%_43%]",children:[y.jsxs("div",{className:"py-[70px] lg:py-[120px] lg:pe-16 flex flex-col justify-center min-h-[420px] lg:min-h-[720px]",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-white/50",children:"Our Business / Real Estate"})}),y.jsx(ue,{delay:.05,children:y.jsx("h1",{className:"mt-6 font-display text-[44px] sm:text-[56px] lg:text-[72px] leading-[1.0] font-medium tracking-[-0.02em] max-w-[620px]",children:"Building value through real assets."})}),y.jsx(ue,{delay:.1,children:y.jsxs("div",{className:"mt-8 space-y-4 text-[16px] lg:text-[17px] leading-[1.65] text-white/70 max-w-[520px]",children:[y.jsx("p",{children:"Alrazah's real estate platform combines investment, development and asset-management capabilities to create and manage properties positioned for long-term relevance and value."}),y.jsx("p",{children:"Our activities span commercial, administrative and residential real estate, supported by disciplined project execution and a long-term approach to ownership."})]})}),y.jsx(ue,{delay:.15,children:y.jsxs("div",{className:"mt-10 flex flex-col sm:flex-row gap-4",children:[y.jsx(Ms,{href:"#portfolio",tone:"dark",children:"Explore Our Portfolio"}),y.jsxs(dn,{to:"/",className:"group inline-flex items-center gap-2.5 h-12 px-7 border border-white/30 text-[11px] uppercase tracking-[0.11em] font-medium text-white hover:border-white transition-colors",children:["Our Approach",y.jsx("span",{className:"inline-block transition-transform duration-200 group-hover:translate-x-[5px]",children:"→"})]})]})})]}),y.jsx("div",{className:"relative min-h-[340px] lg:min-h-[720px] lg:border-s lg:border-white/10",children:y.jsx(Gr,{src:CL,alt:"Contemporary Doha skyline architecture",fittingType:"fill",className:"absolute inset-0 w-full h-full"})})]})}),y.jsx("div",{className:"border-t border-white/15",children:y.jsx("div",{className:"mx-auto max-w-[1440px] px-5 sm:px-10 lg:px-[60px] xl:px-[80px]",children:y.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4",children:PL.map((t,e)=>y.jsxs("div",{className:`py-6 ${e!==0?"ps-6 border-s border-white/15":""}`,children:[y.jsx("div",{className:"text-[10px] uppercase tracking-[0.16em] text-white/40",children:t.label}),y.jsx("div",{className:"mt-2 text-[13px] text-white/90 leading-snug",children:t.value})]},t.label))})})})]})}const z0=[{n:"01",t:"IDENTIFY",d:"Market opportunity and demand"},{n:"02",t:"INVEST",d:"Capital and commercial discipline"},{n:"03",t:"DEVELOP",d:"Planning, design and execution"},{n:"04",t:"DELIVER",d:"Quality, programme and control"},{n:"05",t:"MANAGE",d:"Performance, risk and value"},{n:"06",t:"GROW",d:"Long-term asset potential"}];function kL(){return y.jsx("section",{className:"bg-[#F4F2ED] py-[100px] md:py-[140px]",children:y.jsx(Bt,{children:y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-16",children:[y.jsxs("div",{className:"lg:col-span-5",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"02 / The Platform"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[40px] md:text-[52px] leading-[1.04] font-medium text-[#202020] max-w-[460px]",children:"Real estate is more than the asset. It is the entire investment lifecycle."})}),y.jsx(ue,{delay:.1,children:y.jsxs("div",{className:"mt-8 space-y-5 text-[17px] leading-[1.65] text-[#202020]/75 max-w-[460px]",children:[y.jsx("p",{children:"Alrazah approaches real estate as a long-term business platform encompassing opportunity identification, investment, development, delivery and ongoing asset oversight."}),y.jsx("p",{children:"By combining these capabilities within the wider Group, we are positioned to evaluate opportunities from multiple perspectives—from market demand and development feasibility to execution, asset performance and long-term value."})]})})]}),y.jsxs("div",{className:"lg:col-span-7 lg:ps-8",children:[y.jsx(va,{className:"mb-2"}),y.jsx("ol",{children:z0.map((t,e)=>y.jsx(ue,{as:"li",delay:e*.05,className:"border-b border-[#202020]/15",children:y.jsxs("div",{className:"grid grid-cols-[auto_1fr_auto] items-center gap-6 py-6",children:[y.jsx("span",{className:"font-display text-[20px] text-[#6E1830] w-[34px]",children:t.n}),y.jsxs("div",{children:[y.jsx("div",{className:"text-[15px] uppercase tracking-[0.12em] font-medium text-[#202020]",children:t.t}),y.jsx("div",{className:"text-[14px] text-[#202020]/55 mt-1",children:t.d})]}),ey.jsxs(ue,{delay:e*.07,className:"md:border-s md:border-[#202020]/15 first:md:border-s-0 pt-10 md:pt-12",children:[y.jsx("div",{className:"aspect-[4/5] overflow-hidden",children:y.jsx(Gr,{src:t.img,alt:`${t.title} real estate`,fittingType:"fill",className:"w-full h-full"})}),y.jsxs("div",{className:"mt-6 pb-2",children:[y.jsxs("div",{className:"flex items-baseline justify-between",children:[y.jsx("span",{className:"font-display text-[18px] text-[#6E1830]",children:t.n}),y.jsx("span",{className:"text-[10px] uppercase tracking-[0.14em] text-[#202020]/45",children:"Sector"})]}),y.jsx("h3",{className:"mt-3 font-display text-[28px] font-medium text-[#202020]",children:t.title}),y.jsx("p",{className:"mt-3 text-[14px] leading-[1.6] text-[#202020]/65",children:t.desc}),y.jsx("ul",{className:"mt-5 space-y-1.5",children:t.caps.map(n=>y.jsxs("li",{className:"text-[12px] uppercase tracking-[0.1em] text-[#202020]/55 flex items-center gap-2",children:[y.jsx("span",{className:"w-3 h-px bg-[#6E1830]"}),n]},n))}),y.jsxs(dn,{to:t.href,className:"group inline-flex items-center gap-2 mt-6 text-[11px] uppercase tracking-[0.12em] text-[#202020] hover:text-[#6E1830] transition-colors",children:["View ",t.title," ",y.jsx("span",{className:"inline-block transition-transform duration-200 group-hover:translate-x-[5px]",children:"→"})]})]})]},t.title))})]})})}const OL=[{n:"01",t:"Market Intelligence",d:"Understand demand, location, economic conditions and market dynamics."},{n:"02",t:"Opportunity Assessment",d:"Evaluate feasibility, risk, potential and strategic fit."},{n:"03",t:"Investment Case",d:"Establish a disciplined commercial rationale."},{n:"04",t:"Development Strategy",d:"Define the appropriate development, positioning and delivery approach."},{n:"05",t:"Execution",d:"Coordinate project delivery with appropriate controls."},{n:"06",t:"Asset Performance",d:"Maintain focus on operational performance and long-term value."}];function jL(){return y.jsx("section",{className:"bg-[#202020] py-[120px] md:py-[150px] text-white",children:y.jsxs(Bt,{children:[y.jsxs("div",{className:"max-w-[820px]",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"04 / Investment Model"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[44px] md:text-[56px] leading-[1.05] font-medium",children:"Selective investment. Disciplined development. Enduring assets."})}),y.jsx(ue,{delay:.1,children:y.jsx("p",{className:"mt-8 text-[17px] leading-[1.65] text-white/70 max-w-[640px]",children:"Real estate requires decisions that extend well beyond acquisition. Alrazah evaluates opportunities through a combination of market understanding, commercial discipline, development capability and long-term asset considerations."})})]}),y.jsx(va,{tone:"white",className:"mt-16 opacity-30"}),y.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-6",children:OL.map((t,e)=>y.jsxs(ue,{delay:e*.04,className:"md:ps-6 md:border-l md:border-white/15 pt-10 first:md:border-l-0",children:[y.jsx("div",{className:"font-display text-[18px] text-[#6E1830]",children:t.n}),y.jsx("div",{className:"mt-3 text-[12px] uppercase tracking-[0.1em] font-medium text-white",children:t.t}),y.jsx("div",{className:"mt-3 text-[13px] leading-[1.6] text-white/55",children:t.d})]},t.n))})]})})}const DL=[{n:"01",t:"Commercial Development"},{n:"02",t:"Property Investment"},{n:"03",t:"Asset Positioning"},{n:"04",t:"Long-Term Ownership"}];function LL(){return y.jsx("section",{id:"commercial",className:"bg-[#F4F2ED] py-[100px] md:py-[140px]",children:y.jsx(Bt,{children:y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-16 items-center",children:[y.jsx("div",{className:"lg:col-span-5",children:y.jsx("div",{className:"aspect-[4/5] overflow-hidden",children:y.jsx(Gr,{src:"https://media.base44.com/images/public/6a7a05939fa1d342611ac45e/5c42b4d36_generated_007b2779.png",alt:"Commercial real estate facade in Doha",fittingType:"fill",className:"w-full h-full"})})}),y.jsxs("div",{className:"lg:col-span-7",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"05 / Commercial Real Estate"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[40px] md:text-[54px] leading-[1.05] font-medium text-[#202020] max-w-[520px]",children:"Assets designed around economic activity."})}),y.jsx(ue,{delay:.1,children:y.jsxs("div",{className:"mt-8 space-y-4 text-[16px] leading-[1.65] text-[#202020]/75 max-w-[560px]",children:[y.jsx("p",{children:"Commercial real estate forms an important component of Alrazah's property activities. We focus on assets capable of supporting businesses, professional activity and the continued evolution of Qatar's commercial environment."}),y.jsx("p",{children:"Our approach considers location, accessibility, functionality, tenant requirements, development quality and long-term asset relevance."})]})}),y.jsx(ue,{delay:.15,children:y.jsx("div",{className:"mt-10 grid grid-cols-2 sm:grid-cols-4 border-t border-[#202020]/15",children:DL.map(t=>y.jsxs("div",{className:"pt-6 pe-4",children:[y.jsx("div",{className:"font-display text-[16px] text-[#6E1830]",children:t.n}),y.jsx("div",{className:"mt-2 text-[12px] uppercase tracking-[0.1em] font-medium text-[#202020] leading-snug",children:t.t})]},t.n))})}),y.jsx(ue,{delay:.2,children:y.jsx("div",{className:"mt-10",children:y.jsx(Ms,{href:"#portfolio",tone:"light",children:"View Commercial Portfolio"})})})]})]})})})}const ML=["Location","Accessibility","Functionality","Long-Term Relevance"];function IL(){return y.jsx("section",{id:"administrative",className:"bg-[#E1DED6] py-[100px] md:py-[130px]",children:y.jsx(Bt,{children:y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-16 items-center",children:[y.jsxs("div",{className:"lg:col-span-7 lg:order-1 order-2",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"06 / Administrative Real Estate"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[40px] md:text-[54px] leading-[1.05] font-medium text-[#202020] max-w-[520px]",children:"Environments built for modern organisations."})}),y.jsx(ue,{delay:.1,children:y.jsx("p",{className:"mt-8 text-[16px] leading-[1.65] text-[#202020]/75 max-w-[560px]",children:"Administrative properties occupy a practical position within Qatar's commercial infrastructure. Alrazah's focus is on developing and managing environments that respond to contemporary organisational requirements while maintaining long-term asset quality."})}),y.jsx(ue,{delay:.15,children:y.jsx("div",{className:"mt-10 grid grid-cols-2 sm:grid-cols-4 border-t border-[#202020]/15",children:ML.map((t,e)=>y.jsxs("div",{className:"pt-6 pe-4",children:[y.jsx("div",{className:"font-display text-[16px] text-[#6E1830]",children:String(e+1).padStart(2,"0")}),y.jsx("div",{className:"mt-2 text-[12px] uppercase tracking-[0.1em] font-medium text-[#202020] leading-snug",children:t})]},t))})}),y.jsx(ue,{delay:.2,children:y.jsx("div",{className:"mt-10",children:y.jsx(Ms,{href:"#portfolio",tone:"light",children:"Explore Administrative Assets"})})})]}),y.jsx("div",{className:"lg:col-span-5 lg:order-2 order-1",children:y.jsx("div",{className:"aspect-[4/5] overflow-hidden",children:y.jsx(Gr,{src:"https://media.base44.com/images/public/6a7a05939fa1d342611ac45e/a34959cba_generated_5796232b.png",alt:"Administrative real estate in Qatar",fittingType:"fill",className:"w-full h-full"})})})]})})})}const FL=[{t:"MARKET",d:"Understand demand."},{t:"DESIGN",d:"Prioritise functionality."},{t:"DELIVERY",d:"Maintain quality."},{t:"VALUE",d:"Protect long-term relevance."}];function UL(){return y.jsx("section",{id:"residential",className:"bg-[#F4F2ED] py-[100px] md:py-[140px]",children:y.jsx(Bt,{children:y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-16 items-center",children:[y.jsx("div",{className:"lg:col-span-5",children:y.jsx("div",{className:"aspect-[4/5] overflow-hidden",children:y.jsx(Gr,{src:"https://media.base44.com/images/public/6a7a05939fa1d342611ac45e/850429d49_generated_caaa10ca.png",alt:"Residential real estate in Doha",fittingType:"fill",className:"w-full h-full"})})}),y.jsxs("div",{className:"lg:col-span-7",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"07 / Residential Real Estate"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[40px] md:text-[54px] leading-[1.05] font-medium text-[#202020] max-w-[520px]",children:"Residential assets with lasting market relevance."})}),y.jsx(ue,{delay:.1,children:y.jsxs("div",{className:"mt-8 space-y-4 text-[16px] leading-[1.65] text-[#202020]/75 max-w-[560px]",children:[y.jsx("p",{children:"Alrazah's residential activities are focused on properties that respond to evolving housing requirements while maintaining a clear emphasis on quality, functionality and long-term asset value."}),y.jsx("p",{children:"From development strategy through delivery and asset oversight, residential opportunities are considered within the broader context of market demand and sustainable performance."})]})}),y.jsx(ue,{delay:.15,children:y.jsx("div",{className:"mt-10 grid grid-cols-2 sm:grid-cols-4 border-t border-[#202020]/15",children:FL.map((t,e)=>y.jsxs("div",{className:"pt-6 pe-4",children:[y.jsx("div",{className:"font-display text-[16px] text-[#6E1830]",children:String(e+1).padStart(2,"0")}),y.jsx("div",{className:"mt-2 text-[13px] uppercase tracking-[0.1em] font-medium text-[#202020]",children:t.t}),y.jsx("div",{className:"mt-1 text-[13px] text-[#202020]/55 leading-snug",children:t.d})]},t.t))})}),y.jsx(ue,{delay:.2,children:y.jsx("div",{className:"mt-10",children:y.jsx(Ms,{href:"#portfolio",tone:"light",children:"View Residential Portfolio"})})})]})]})})})}const VL=[{n:"01",t:"DEFINE",d:"Development objectives and requirements."},{n:"02",t:"DESIGN",d:"Translate objectives into appropriate technical solutions."},{n:"03",t:"COORDINATE",d:"Manage consultants, contractors and stakeholders."},{n:"04",t:"CONTROL",d:"Monitor programme, quality, cost and risk."},{n:"05",t:"DELIVER",d:"Complete and transition the asset into operation."}];function BL(){return y.jsx("section",{id:"development-delivery",className:"bg-[#202020] py-[120px] md:py-[160px] text-white",children:y.jsx(Bt,{children:y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12",children:[y.jsxs("div",{className:"lg:col-span-5",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"08 / Development & Delivery"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[44px] md:text-[56px] leading-[1.05] font-medium",children:"From land and opportunity to completed asset."})}),y.jsx(ue,{delay:.1,children:y.jsx("p",{className:"mt-8 text-[17px] leading-[1.65] text-white/70 max-w-[440px]",children:"Development transforms investment strategy into physical assets. Alrazah's in-house project-management capabilities provide an important link between investment objectives and delivery."})})]}),y.jsxs("div",{className:"lg:col-span-7",children:[y.jsx(va,{tone:"white",className:"opacity-30"}),VL.map((t,e)=>y.jsx(ue,{delay:e*.05,children:y.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-8 py-8 border-b border-white/15",children:[y.jsx("span",{className:"font-display text-[22px] text-[#6E1830] w-[40px]",children:t.n}),y.jsxs("div",{children:[y.jsx("div",{className:"text-[15px] uppercase tracking-[0.12em] font-medium",children:t.t}),y.jsx("div",{className:"text-[14px] text-white/55 mt-2 max-w-[380px]",children:t.d})]})]})},t.n)),y.jsxs("div",{className:"mt-10",children:[y.jsx("p",{className:"text-[15px] text-white/80 font-medium",children:"Real estate investment is strengthened by the ability to execute."}),y.jsxs(dn,{to:"/our-business/project-management/",className:"group inline-flex items-center gap-2 mt-4 text-[11px] uppercase tracking-[0.12em] text-[#6E1830] hover:text-white transition-colors",children:["Explore Project Management",y.jsx("span",{className:"inline-block transition-transform duration-200 group-hover:translate-x-[5px]",children:"→"})]})]})]})]})})})}const zL=[{n:"01",t:"PERFORMANCE",d:"Monitor operational and financial performance."},{n:"02",t:"RISK",d:"Identify and manage material risks."},{n:"03",t:"CAPITAL",d:"Evaluate ongoing investment and capital requirements."},{n:"04",t:"VALUE",d:"Identify opportunities to preserve and enhance long-term asset value."}];function $L(){return y.jsx("section",{id:"asset-management",className:"bg-[#D8D4CB] py-[120px] md:py-[140px]",children:y.jsxs(Bt,{children:[y.jsxs("div",{className:"max-w-[760px]",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"09 / Asset Management"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[44px] md:text-[56px] leading-[1.05] font-medium text-[#202020]",children:"Ownership does not end at completion."})}),y.jsx(ue,{delay:.1,children:y.jsx("p",{className:"mt-8 text-[17px] leading-[1.65] text-[#202020]/75 max-w-[620px]",children:"The long-term performance of a real-estate asset depends on what happens after development. Alrazah's asset-management discipline focuses on maintaining visibility over performance, risk, capital requirements and future opportunities."})})]}),y.jsx(va,{className:"mt-14"}),y.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 mt-2",children:zL.map((t,e)=>y.jsxs(ue,{delay:e*.06,className:"lg:ps-6 lg:border-l lg:border-[#202020]/15 pt-10 first:lg:border-l-0",children:[y.jsx("div",{className:"font-display text-[18px] text-[#6E1830]",children:t.n}),y.jsx("div",{className:"mt-4 text-[15px] uppercase tracking-[0.12em] font-medium text-[#202020]",children:t.t}),y.jsx("div",{className:"mt-3 text-[14px] leading-[1.6] text-[#202020]/60",children:t.d})]},t.t))}),y.jsx("div",{className:"mt-14",children:y.jsx(Ms,{to:"/our-business/asset-management/",tone:"light",children:"Explore Asset Management"})})]})})}const Bl="text-[12px] uppercase tracking-[0.14em] font-medium text-[#202020]";function WL(){return y.jsx("section",{className:"bg-[#F4F2ED] py-[120px] md:py-[150px]",children:y.jsx(Bt,{children:y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-16 items-center",children:[y.jsxs("div",{className:"lg:col-span-5",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"10 / Integrated Capability"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[44px] md:text-[56px] leading-[1.05] font-medium text-[#202020]",children:"Four capabilities. One real-estate platform."})}),y.jsx(ue,{delay:.1,children:y.jsxs("div",{className:"mt-8 space-y-5 text-[16px] leading-[1.65] text-[#202020]/75 max-w-[460px]",children:[y.jsx("p",{children:"Real estate sits at the intersection of several Alrazah capabilities."}),y.jsx("p",{children:"Investment provides the commercial foundation. Development converts opportunities into physical assets. Project management supports disciplined delivery. Asset management maintains focus on performance after completion."}),y.jsx("p",{children:"Together, these capabilities provide a more complete platform for participating in the real-estate lifecycle."})]})})]}),y.jsx("div",{className:"lg:col-span-7",children:y.jsx(ue,{children:y.jsxs("div",{className:"grid grid-cols-3 grid-rows-3 w-full max-w-[560px] mx-auto",style:{minHeight:"420px"},children:[y.jsx("div",{}),y.jsx("div",{className:"flex items-end justify-center pb-8 border-b border-[#202020]/30",children:y.jsx("span",{className:Bl,children:"Investment"})}),y.jsx("div",{}),y.jsx("div",{className:"flex items-center justify-center pe-6 border-r border-[#202020]/30",children:y.jsx("span",{className:Bl+" text-right",children:"Development"})}),y.jsxs("div",{className:"bg-[#202020] text-white flex flex-col items-center justify-center text-center px-4",children:[y.jsx("span",{className:"font-display text-[18px] leading-tight",children:"Alrazah"}),y.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-white/60 mt-1",children:"Real Estate"})]}),y.jsx("div",{className:"flex items-center justify-center ps-6 border-l border-[#202020]/30",children:y.jsx("span",{className:Bl,children:"Asset Management"})}),y.jsx("div",{}),y.jsx("div",{className:"flex items-start justify-center pt-8 border-t border-[#202020]/30",children:y.jsx("span",{className:Bl,children:"Project Management"})}),y.jsx("div",{})]})})})]})})})}function HL(){return y.jsx("section",{className:"bg-[#202020] py-[100px] md:py-[130px] text-white",children:y.jsx(Bt,{children:y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-16",children:[y.jsxs("div",{className:"lg:col-span-5",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"11 / Qatar"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[40px] md:text-[52px] leading-[1.05] font-medium",children:"Built from local knowledge. Positioned for Qatar's continued development."})}),y.jsx(ue,{delay:.1,children:y.jsxs("div",{className:"mt-8 space-y-4 text-[16px] leading-[1.65] text-white/70 max-w-[460px]",children:[y.jsx("p",{children:"Alrazah's real-estate activities are rooted in Qatar, where deep understanding of the local market, regulatory environment, development landscape and economic priorities provides an important foundation for decision-making."}),y.jsx("p",{children:"Qatar's continued investment in infrastructure, urban development and economic diversification creates a dynamic environment for real-estate businesses capable of combining local understanding with disciplined investment and execution."})]})})]}),y.jsx("div",{className:"lg:col-span-7",children:y.jsx(ue,{children:y.jsxs("div",{className:"relative aspect-[16/10] overflow-hidden",children:[y.jsx(Gr,{src:"https://media.base44.com/images/public/6a7a05939fa1d342611ac45e/db753a1d6_generated_fbfbd2ec.png",alt:"Aerial view of Doha, Qatar",fittingType:"fill",className:"w-full h-full"}),y.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#202020]/70 via-transparent to-transparent"}),y.jsxs("div",{className:"absolute left-6 top-6",children:[y.jsx("div",{className:"font-display text-[22px] text-white",children:"Doha"}),y.jsx("div",{className:"text-[10px] uppercase tracking-[0.18em] text-white/70 mt-1",children:"Qatar"})]}),y.jsxs("div",{className:"absolute left-6 bottom-6 flex flex-wrap gap-x-5 gap-y-1 text-[10px] uppercase tracking-[0.16em] text-white/75",children:[y.jsx("span",{children:"Real Estate"}),y.jsx("span",{children:"Development"}),y.jsx("span",{children:"Investment"}),y.jsx("span",{children:"Infrastructure"})]})]})})})]})})})}const qL=[{name:"West Bay Commercial Tower",category:"Commercial",location:"Doha, Qatar",role:"Investment & Ownership",status:"Active",img:"https://media.base44.com/images/public/6a7a05939fa1d342611ac45e/33d0643b0_generated_c97bd6dd.png"},{name:"Lusail Residential Development",category:"Residential",location:"Lusail, Qatar",role:"Development",status:"Development",img:"https://media.base44.com/images/public/6a7a05939fa1d342611ac45e/9a5bb8aaf_generated_6737dab7.png"},{name:"Administrative Office Building",category:"Administrative",location:"Doha, Qatar",role:"Development & Management",status:"Completed",img:"https://media.base44.com/images/public/6a7a05939fa1d342611ac45e/3e2a034e1_generated_c55976bb.png"},{name:"Mixed-Use Development",category:"Commercial",location:"Doha, Qatar",role:"Investment & Development",status:"Development",img:"https://media.base44.com/images/public/6a7a05939fa1d342611ac45e/5d316afb1_generated_acff0f20.png"}],KL=["ALL","COMMERCIAL","ADMINISTRATIVE","RESIDENTIAL","DEVELOPMENT","COMPLETED"];function QL(t,e){return e==="ALL"?!0:["COMMERCIAL","ADMINISTRATIVE","RESIDENTIAL"].includes(e)?t.category.toUpperCase()===e:e==="DEVELOPMENT"?t.status.toUpperCase()==="DEVELOPMENT":e==="COMPLETED"?t.status.toUpperCase()==="COMPLETED":!0}function GL(){const[t,e]=BP(),n=(t.get("category")||"ALL").toUpperCase(),s=l=>e(l==="ALL"?{}:{category:l.toLowerCase()},{replace:!0}),o=qL.filter(l=>QL(l,n));return y.jsx("section",{id:"portfolio",className:"bg-[#E5E2DB] py-[100px] md:py-[130px]",children:y.jsxs(Bt,{children:[y.jsxs("div",{className:"max-w-[720px]",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"12 / Portfolio"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[40px] md:text-[52px] leading-[1.05] font-medium text-[#202020]",children:"Selected real-estate interests."})}),y.jsx(ue,{delay:.1,children:y.jsx("p",{className:"mt-6 text-[16px] leading-[1.65] text-[#202020]/70 max-w-[560px]",children:"Explore selected properties, developments and real-estate activities across the Alrazah portfolio."})})]}),y.jsx("div",{className:"mt-12 flex gap-2 overflow-x-auto no-scrollbar pb-2",children:KL.map(l=>y.jsx("button",{onClick:()=>s(l),className:`shrink-0 h-11 px-5 border text-[11px] uppercase tracking-[0.12em] font-medium transition-colors duration-200 ${n===l?"bg-[#202020] text-white border-[#202020]":"border-[#202020]/25 text-[#202020]/70 hover:border-[#6E1830] hover:text-[#6E1830]"}`,children:l},l))}),y.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-12 mt-12",children:o.map((l,u)=>y.jsx(ue,{delay:u%2*.06,children:y.jsxs(dn,{to:"/",className:"group block border-b border-[#202020]/15 hover:border-[#6E1830] transition-colors duration-200",children:[y.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:y.jsx(Gr,{src:l.img,alt:l.name,fittingType:"fill",className:"w-full h-full transition-transform duration-300 ease-out group-hover:scale-[1.015]"})}),y.jsxs("div",{className:"pt-6 pb-8",children:[y.jsx("h3",{className:"font-display text-[24px] font-medium text-[#202020]",children:l.name}),y.jsxs("dl",{className:"mt-5 grid grid-cols-2 gap-y-3 text-[12px]",children:[y.jsx("dt",{className:"uppercase tracking-[0.12em] text-[#202020]/45",children:"Category"}),y.jsx("dd",{className:"text-[#202020]/85 text-right",children:l.category}),y.jsx("dt",{className:"uppercase tracking-[0.12em] text-[#202020]/45",children:"Location"}),y.jsx("dd",{className:"text-[#202020]/85 text-right",children:l.location}),y.jsx("dt",{className:"uppercase tracking-[0.12em] text-[#202020]/45",children:"Alrazah Role"}),y.jsx("dd",{className:"text-[#202020]/85 text-right",children:l.role}),y.jsx("dt",{className:"uppercase tracking-[0.12em] text-[#202020]/45",children:"Status"}),y.jsx("dd",{className:"text-right",children:y.jsx("span",{className:"inline-block text-[#6E1830]",children:l.status})})]}),y.jsxs("span",{className:"mt-6 inline-flex items-center gap-2 text-[11px] uppercase tracking-[0.12em] text-[#202020] group-hover:text-[#6E1830] transition-colors",children:["View Profile",y.jsx("span",{className:"inline-block transition-transform duration-200 group-hover:translate-x-[5px]",children:"→"})]})]})]})},l.name))})]})})}const XL=[{n:"01",t:"QUALITY",d:"Build assets that remain relevant."},{n:"02",t:"DISCIPLINE",d:"Make decisions grounded in commercial and operational realities."},{n:"03",t:"LONGEVITY",d:"Maintain a long-term perspective on ownership and value."}];function YL(){return y.jsx("section",{className:"bg-[#F4F2ED] py-[110px] md:py-[140px]",children:y.jsxs(Bt,{children:[y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-16",children:[y.jsxs("div",{className:"lg:col-span-5",children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"13 / Long-Term Value"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[44px] md:text-[56px] leading-[1.05] font-medium text-[#202020]",children:"We develop for today. We invest for the long term."})})]}),y.jsx("div",{className:"lg:col-span-7 lg:ps-8",children:y.jsx(ue,{delay:.1,children:y.jsxs("div",{className:"space-y-5 text-[17px] leading-[1.65] text-[#202020]/75 max-w-[560px]",children:[y.jsx("p",{children:"Real estate is inherently long-term. The decisions made during acquisition, planning, development and delivery can influence asset performance for years to come."}),y.jsx("p",{children:"Alrazah therefore maintains a long-term perspective across its real-estate activities, balancing immediate commercial considerations with asset quality, market relevance, operational performance and future value."})]})})})]}),y.jsx(va,{className:"mt-16"}),y.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 mt-2",children:XL.map((t,e)=>y.jsxs(ue,{delay:e*.06,className:"md:ps-6 md:border-l md:border-[#202020]/15 pt-10 first:md:border-l-0",children:[y.jsx("div",{className:"font-display text-[18px] text-[#6E1830]",children:t.n}),y.jsx("div",{className:"mt-4 text-[16px] uppercase tracking-[0.12em] font-medium text-[#202020]",children:t.t}),y.jsx("div",{className:"mt-3 text-[14px] leading-[1.6] text-[#202020]/60 max-w-[300px]",children:t.d})]},t.t))})]})})}const JL=[{title:"Project Management",sub:"Execution capability",d:"Supporting development through disciplined planning, coordination and delivery.",to:"#development-delivery"},{title:"Asset Management",sub:"Ownership discipline",d:"Maintaining visibility over asset performance, risk and long-term value.",to:"#asset-management"},{title:"Our Approach",sub:"Investment philosophy",d:"Understand the principles that guide Alrazah’s decisions across its businesses and assets.",to:"/"}];function ZL(){return y.jsx("section",{className:"bg-[#D8D4CB] py-[90px] md:py-[120px]",children:y.jsxs(Bt,{children:[y.jsx(ue,{children:y.jsx(zt,{className:"text-[#6E1830]",children:"Related Platforms"})}),y.jsx(ue,{delay:.05,children:y.jsx("h2",{className:"mt-6 font-display text-[36px] md:text-[48px] leading-[1.05] font-medium text-[#202020] max-w-[680px]",children:"Real estate does not operate in isolation."})}),y.jsx(ue,{delay:.1,children:y.jsx("p",{className:"mt-5 text-[16px] leading-[1.6] text-[#202020]/65 max-w-[560px]",children:"Explore the wider capabilities that support Alrazah's real-estate platform."})}),y.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 mt-14 border-t border-[#202020]/15",children:JL.map((t,e)=>y.jsx(ue,{delay:e*.06,children:y.jsxs(dn,{to:t.to,className:"group block py-8 pe-6 md:border-r md:border-[#202020]/15 last:md:border-r-0 border-b md:border-b-0 border-[#202020]/15",children:[y.jsx("div",{className:"text-[10px] uppercase tracking-[0.14em] text-[#202020]/50",children:t.sub}),y.jsx("div",{className:"mt-2 font-display text-[26px] font-medium text-[#202020]",children:t.title}),y.jsx("p",{className:"mt-3 text-[14px] leading-[1.6] text-[#202020]/60 max-w-[320px]",children:t.d}),y.jsxs("span",{className:"mt-5 inline-flex items-center gap-2 text-[11px] uppercase tracking-[0.12em] text-[#6E1830]",children:["Explore ",y.jsx("span",{className:"inline-block transition-transform duration-200 group-hover:translate-x-[5px]",children:"→"})]})]})},t.title))})]})})}function eM(){return y.jsx("section",{className:"bg-[#6E1830] py-[90px]",children:y.jsx(Bt,{children:y.jsxs("div",{className:"flex flex-col items-center text-center max-w-[640px] mx-auto",children:[y.jsx(ue,{children:y.jsx("h2",{className:"font-display text-[34px] md:text-[44px] leading-[1.05] font-medium text-white",children:"Explore the Alrazah portfolio."})}),y.jsx(ue,{delay:.08,children:y.jsx("p",{className:"mt-5 text-[15px] leading-[1.6] text-white/75 max-w-[460px]",children:"Discover the businesses, assets and projects that form the wider Alrazah Group."})}),y.jsx(ue,{delay:.14,children:y.jsxs("div",{className:"mt-8 flex flex-col sm:flex-row gap-4",children:[y.jsx(Ms,{to:"/",tone:"onMaroon",children:"View Our Business"}),y.jsx(Ms,{to:"/",tone:"onMaroon",children:"Contact Alrazah"})]})})]})})})}function Yd({title:t,links:e}){return y.jsxs("div",{children:[y.jsx("div",{className:"text-[10px] uppercase tracking-[0.16em] text-white/40",children:t}),y.jsx("ul",{className:"mt-4 space-y-3",children:e.map(n=>y.jsx("li",{children:y.jsx(dn,{to:"/",className:"text-[13px] text-white/70 hover:text-white transition-colors",children:n})},n))})]})}function tM(){return y.jsx("footer",{className:"bg-[#202020] text-white/70",children:y.jsxs("div",{className:"mx-auto max-w-[1440px] px-5 sm:px-10 lg:px-[60px] xl:px-[80px] py-16",children:[y.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-12 gap-10",children:[y.jsxs("div",{className:"md:col-span-5",children:[y.jsx("div",{className:"font-display text-[24px] text-white",children:"Alrazah"}),y.jsx("div",{className:"text-[10px] uppercase tracking-[0.2em] text-white/40 mt-1",children:"Holding"}),y.jsx("p",{className:"mt-6 text-[14px] leading-[1.6] text-white/50 max-w-[320px]",children:"A structured platform for investment, development and long-term asset ownership across Qatar."})]}),y.jsxs("div",{className:"md:col-span-7 grid grid-cols-2 sm:grid-cols-3 gap-8",children:[y.jsx(Yd,{title:"Our Business",links:["Real Estate","Asset Management","Project Management"]}),y.jsx(Yd,{title:"Company",links:["Our Approach","Contact"]}),y.jsx(Yd,{title:"Legal",links:["Privacy","Terms"]})]})]}),y.jsxs("div",{className:"mt-14 pt-6 border-t border-white/10 flex flex-col sm:flex-row justify-between gap-3 text-[11px] uppercase tracking-[0.12em] text-white/40",children:[y.jsxs("span",{children:["© ",new Date().getFullYear()," Alrazah Holding. All rights reserved."]}),y.jsx("span",{children:"Doha, Qatar"})]})]})})}function nM(){return y.jsxs("div",{className:"bg-[#F4F2ED]",children:[y.jsx(zN,{}),y.jsx(WN,{}),y.jsxs("main",{children:[y.jsx(RL,{}),y.jsx(kL,{}),y.jsx(NL,{}),y.jsx(jL,{}),y.jsx(LL,{}),y.jsx(IL,{}),y.jsx(UL,{}),y.jsx(BL,{}),y.jsx($L,{}),y.jsx(WL,{}),y.jsx(HL,{}),y.jsx(GL,{}),y.jsx(YL,{}),y.jsx(ZL,{}),y.jsx(eM,{})]}),y.jsx(tM,{})]})}const rM=()=>{const{isLoadingAuth:t,isLoadingPublicSettings:e,authError:n,navigateToLogin:s}=FN();if(e||t)return y.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:y.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return y.jsx(UN,{});if(n.type==="auth_required")return s(),null}return y.jsxs(kP,{children:[y.jsx(Wl,{path:"/",element:y.jsx(PP,{to:"/our-business/real-estate",replace:!0})}),y.jsx(Wl,{path:"/our-business/real-estate",element:y.jsx(nM,{})}),y.jsx(Wl,{path:"*",element:y.jsx(MN,{})})]})};function sM(){return y.jsx(IN,{children:y.jsxs(EC,{client:LC,children:[y.jsxs(IP,{children:[y.jsx(BN,{}),y.jsx(rM,{})]}),y.jsx(X_,{})]})})}qb.createRoot(document.getElementById("root")).render(y.jsx(sM,{}));